mirror of
https://github.com/volatiletech/authboss.git
synced 2026-06-19 23:00:27 +02:00
Go vet fixes.
This commit is contained in:
+3
-3
@@ -317,15 +317,15 @@ func TestAuth_logoutHandlerFunc_GET(t *testing.T) {
|
||||
}
|
||||
|
||||
if val, ok := sessionStorer.Get(authboss.SessionKey); ok {
|
||||
t.Errorf("Unexpected session key:", val)
|
||||
t.Error("Unexpected session key:", val)
|
||||
}
|
||||
|
||||
if val, ok := sessionStorer.Get(authboss.SessionLastAction); ok {
|
||||
t.Errorf("Unexpected last action:", val)
|
||||
t.Error("Unexpected last action:", val)
|
||||
}
|
||||
|
||||
if val, ok := cookieStorer.Get(authboss.CookieRemember); ok {
|
||||
t.Errorf("Unexpected rm cookie:", val)
|
||||
t.Error("Unexpected rm cookie:", val)
|
||||
}
|
||||
|
||||
if http.StatusFound != w.Code {
|
||||
|
||||
@@ -159,7 +159,7 @@ func TestConfirm_ConfirmHandlerErrors(t *testing.T) {
|
||||
|
||||
err := c.confirmHandler(ctx, w, r)
|
||||
if err == nil {
|
||||
t.Fatal("%d) Expected an error", i)
|
||||
t.Fatalf("%d) Expected an error", i)
|
||||
}
|
||||
|
||||
if !reflect.DeepEqual(err, test.Error) {
|
||||
|
||||
+1
-1
@@ -98,7 +98,7 @@ func TestAfterAuthFail_Lock(t *testing.T) {
|
||||
t.Errorf("%d: StoreAttemptNumber set incorrectly: %v", i, val)
|
||||
}
|
||||
if current, ok = storer.Users[email][StoreAttemptTime].(time.Time); !ok || old.After(current) {
|
||||
t.Error("%d: StoreAttemptTime not set correctly: %v", i, current)
|
||||
t.Errorf("%d: StoreAttemptTime not set correctly: %v", i, current)
|
||||
}
|
||||
|
||||
current = old
|
||||
|
||||
@@ -160,7 +160,10 @@ func TestOAuthSuccess(t *testing.T) {
|
||||
ClientID: `jazz`,
|
||||
ClientSecret: `hands`,
|
||||
Scopes: []string{`profile`, `email`},
|
||||
Endpoint: oauth2.Endpoint{"fakeauth", "faketoken"},
|
||||
Endpoint: oauth2.Endpoint{
|
||||
AuthURL: "fakeauth",
|
||||
TokenURL: "faketoken",
|
||||
},
|
||||
},
|
||||
Callback: fakeCallback,
|
||||
AdditionalParams: url.Values{"include_requested_scopes": []string{"true"}},
|
||||
|
||||
+1
-1
@@ -387,7 +387,7 @@ func TestUnbind_Valuer(t *testing.T) {
|
||||
Count sql.NullInt64
|
||||
Time NullTime
|
||||
}{
|
||||
sql.NullInt64{12, true},
|
||||
sql.NullInt64{Int64: 12, Valid: true},
|
||||
NullTime{nowTime, true},
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user