Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-pages.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNick Thomas <nick@gitlab.com>2019-09-11 16:46:05 +0300
committerNick Thomas <nick@gitlab.com>2019-09-12 14:18:00 +0300
commit26d8e2d1197e0ffb9c0fcd47bb61ef35a901f67b (patch)
tree0829e6f01c15972e1780ed9fc1f42d993350c830 /internal/host
parentdd802698dba879ef5eeeb7b4f4abd03364f3788f (diff)
Remove github.com/stretchr/testify/assert
The "assert" form is difficult to use correctly and complicates test understanding. I think we should insist on using require *only* in our tests across GitLab.
Diffstat (limited to 'internal/host')
-rw-r--r--internal/host/host_test.go10
1 files changed, 5 insertions, 5 deletions
diff --git a/internal/host/host_test.go b/internal/host/host_test.go
index 8395d3fc..7168eb1b 100644
--- a/internal/host/host_test.go
+++ b/internal/host/host_test.go
@@ -4,15 +4,15 @@ import (
"net/http/httptest"
"testing"
- "github.com/stretchr/testify/assert"
+ "github.com/stretchr/testify/require"
)
func TestFromString(t *testing.T) {
- assert.Equal(t, "example.com", FromString("example.com"))
- assert.Equal(t, "example.com", FromString("eXAmpLe.com"))
- assert.Equal(t, "example.com", FromString("example.com:8080"))
+ require.Equal(t, "example.com", FromString("example.com"))
+ require.Equal(t, "example.com", FromString("eXAmpLe.com"))
+ require.Equal(t, "example.com", FromString("example.com:8080"))
}
func TestFromRequest(t *testing.T) {
- assert.Equal(t, "example.com", FromRequest(httptest.NewRequest("GET", "example.com:8080/123", nil)))
+ require.Equal(t, "example.com", FromRequest(httptest.NewRequest("GET", "example.com:8080/123", nil)))
}