Skip to content

Commit 2fc02b2

Browse files
committed
add TEST
1 parent d2f547a commit 2fc02b2

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

integrations/compare_test.go

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ package integrations
66

77
import (
88
"net/http"
9+
"strings"
910
"testing"
1011

1112
"github.com/stretchr/testify/assert"
@@ -21,4 +22,8 @@ func TestCompareTag(t *testing.T) {
2122
selection := htmlDoc.doc.Find(".choose.branch .filter.dropdown")
2223
// A dropdown for both base and head.
2324
assert.Lenf(t, selection.Nodes, 2, "The template has changed")
25+
26+
req = NewRequest(t, "GET", "/user2/repo1/compare/invalid")
27+
resp = session.MakeRequest(t, req, http.StatusNotFound)
28+
assert.False(t, strings.Contains(resp.Body.String(), "/assets/img/500.png"), "expect 404 page not 500")
2429
}

0 commit comments

Comments
 (0)