Skip to content

Commit

Permalink
add TEST
Browse files Browse the repository at this point in the history
  • Loading branch information
6543 committed Sep 30, 2021
1 parent d2f547a commit 2fc02b2
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions integrations/compare_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ package integrations

import (
"net/http"
"strings"
"testing"

"github.com/stretchr/testify/assert"
Expand All @@ -21,4 +22,8 @@ func TestCompareTag(t *testing.T) {
selection := htmlDoc.doc.Find(".choose.branch .filter.dropdown")
// A dropdown for both base and head.
assert.Lenf(t, selection.Nodes, 2, "The template has changed")

req = NewRequest(t, "GET", "/user2/repo1/compare/invalid")
resp = session.MakeRequest(t, req, http.StatusNotFound)
assert.False(t, strings.Contains(resp.Body.String(), "/assets/img/500.png"), "expect 404 page not 500")
}

0 comments on commit 2fc02b2

Please sign in to comment.