summaryrefslogtreecommitdiffstats
path: root/models/user_openid_test.go
diff options
context:
space:
mode:
authorKN4CK3R <admin@oldschoolhack.me>2021-06-07 07:27:09 +0200
committerGitHub <noreply@github.com>2021-06-07 07:27:09 +0200
commit3607f79d7869046d919fed05a21b55b6e61df1fa (patch)
tree9a176a4d5b67ac3a81ae210e9164d81959221ce0 /models/user_openid_test.go
parentMake commit info cancelable (#16032) (diff)
downloadforgejo-3607f79d7869046d919fed05a21b55b6e61df1fa.tar.xz
forgejo-3607f79d7869046d919fed05a21b55b6e61df1fa.zip
Fixed assert statements. (#16089)
Diffstat (limited to 'models/user_openid_test.go')
-rw-r--r--models/user_openid_test.go10
1 files changed, 5 insertions, 5 deletions
diff --git a/models/user_openid_test.go b/models/user_openid_test.go
index 18f84bef76..d04b072279 100644
--- a/models/user_openid_test.go
+++ b/models/user_openid_test.go
@@ -15,15 +15,15 @@ func TestGetUserOpenIDs(t *testing.T) {
oids, err := GetUserOpenIDs(int64(1))
if assert.NoError(t, err) && assert.Len(t, oids, 2) {
- assert.Equal(t, oids[0].URI, "https://user1.domain1.tld/")
+ assert.Equal(t, "https://user1.domain1.tld/", oids[0].URI)
assert.False(t, oids[0].Show)
- assert.Equal(t, oids[1].URI, "http://user1.domain2.tld/")
+ assert.Equal(t, "http://user1.domain2.tld/", oids[1].URI)
assert.True(t, oids[1].Show)
}
oids, err = GetUserOpenIDs(int64(2))
if assert.NoError(t, err) && assert.Len(t, oids, 1) {
- assert.Equal(t, oids[0].URI, "https://domain1.tld/user2/")
+ assert.Equal(t, "https://domain1.tld/user2/", oids[0].URI)
assert.True(t, oids[0].Show)
}
}
@@ -38,12 +38,12 @@ func TestGetUserByOpenID(t *testing.T) {
user, err := GetUserByOpenID("https://user1.domain1.tld")
if assert.NoError(t, err) {
- assert.Equal(t, user.ID, int64(1))
+ assert.Equal(t, int64(1), user.ID)
}
user, err = GetUserByOpenID("https://domain1.tld/user2/")
if assert.NoError(t, err) {
- assert.Equal(t, user.ID, int64(2))
+ assert.Equal(t, int64(2), user.ID)
}
}