summaryrefslogtreecommitdiff
path: root/internal/command/personalaccesstoken
diff options
context:
space:
mode:
authorZeger-Jan van de Weg <git@zjvandeweg.nl>2020-10-15 08:44:05 +0200
committerZeger-Jan van de Weg <git@zjvandeweg.nl>2020-10-15 08:44:05 +0200
commit308948b3838c88621e738762241e8d1980881a17 (patch)
tree0cef7c4eb067c2320167634850598bd7d96cc953 /internal/command/personalaccesstoken
parent3f03127314bd768efd0bef57915320545afcdd78 (diff)
downloadgitlab-shell-zj-remove-testify-assert.tar.gz
tests: Replace assert with requirezj-remove-testify-assert
Testify features sub packages `assert` and `require`. The difference is subtle, and lost on novice Golang developers that don't read the docs. To create a more consistent code base `assert` will no longer be used. This change was generated by a running a sed command on all `_test.go` files, followed by `goimports -w`.
Diffstat (limited to 'internal/command/personalaccesstoken')
-rw-r--r--internal/command/personalaccesstoken/personalaccesstoken_test.go7
1 files changed, 3 insertions, 4 deletions
diff --git a/internal/command/personalaccesstoken/personalaccesstoken_test.go b/internal/command/personalaccesstoken/personalaccesstoken_test.go
index 5970142..aa56ce9 100644
--- a/internal/command/personalaccesstoken/personalaccesstoken_test.go
+++ b/internal/command/personalaccesstoken/personalaccesstoken_test.go
@@ -8,7 +8,6 @@ import (
"net/http"
"testing"
- "github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
"gitlab.com/gitlab-org/gitlab-shell/client/testserver"
@@ -174,13 +173,13 @@ func TestExecute(t *testing.T) {
err := cmd.Execute(context.Background())
if tc.expectedError == "" {
- assert.NoError(t, err)
+ require.NoError(t, err)
} else {
- assert.EqualError(t, err, tc.expectedError)
+ require.EqualError(t, err, tc.expectedError)
}
if tc.expectedOutput != "" {
- assert.Equal(t, tc.expectedOutput, output.String())
+ require.Equal(t, tc.expectedOutput, output.String())
}
})
}