3 Commits

2 changed files with 5 additions and 4 deletions
+3 -3
View File
@@ -20,15 +20,15 @@ stages:
deps: deps:
stage: deps stage: deps
image: golang:1.13 image: golang:1.14
script: script:
- go get -mod=readonly - go mod download
test: test:
stage: test stage: test
dependencies: dependencies:
- deps - deps
image: golang:1.13 image: golang:1.14
script: script:
- go fmt $(go list ./...) - go fmt $(go list ./...)
- go vet $(go list ./...) - go vet $(go list ./...)
+2 -1
View File
@@ -5,6 +5,7 @@ import (
"github.com/stretchr/testify/assert" "github.com/stretchr/testify/assert"
"net/http" "net/http"
"net/http/httptest" "net/http/httptest"
"sort"
"testing" "testing"
) )
@@ -64,7 +65,7 @@ func TestPrivilegeHandler_Process_UserAdded_And_UserRemoved(t *testing.T) {
companies := handler.CompaniesByUser("jim@example.org", func(privileges CompanyPrivileges) bool { companies := handler.CompaniesByUser("jim@example.org", func(privileges CompanyPrivileges) bool {
return true return true
}) })
sort.Strings(companies)
assert.Equal(t, []string{"abc-123", "abc-456"}, companies) assert.Equal(t, []string{"abc-123", "abc-456"}, companies)
result = handler.Process(&UserRemoved{ result = handler.Process(&UserRemoved{