aboutsummaryrefslogtreecommitdiffstats
path: root/models/auth/oauth2_test.go
diff options
context:
space:
mode:
Diffstat (limited to 'models/auth/oauth2_test.go')
-rw-r--r--models/auth/oauth2_test.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/models/auth/oauth2_test.go b/models/auth/oauth2_test.go
index 43daa0b5ec..c6626b283e 100644
--- a/models/auth/oauth2_test.go
+++ b/models/auth/oauth2_test.go
@@ -25,7 +25,7 @@ func TestOAuth2Application_GenerateClientSecret(t *testing.T) {
func BenchmarkOAuth2Application_GenerateClientSecret(b *testing.B) {
assert.NoError(b, unittest.PrepareTestDatabase())
app := unittest.AssertExistsAndLoadBean(b, &auth_model.OAuth2Application{ID: 1})
- for i := 0; i < b.N; i++ {
+ for b.Loop() {
_, _ = app.GenerateClientSecret(db.DefaultContext)
}
}
@@ -126,7 +126,7 @@ func TestOAuth2Application_CreateGrant(t *testing.T) {
assert.NotNil(t, grant)
assert.Equal(t, int64(2), grant.UserID)
assert.Equal(t, int64(1), grant.ApplicationID)
- assert.Equal(t, "", grant.Scope)
+ assert.Empty(t, grant.Scope)
}
//////////////////// Grant