From 5abf00ab87a55662eefc7716de52ead9749293c6 Mon Sep 17 00:00:00 2001 From: jwijenbergh Date: Fri, 13 May 2022 12:12:22 +0200 Subject: Refactor: Adapt the API to the documentation --- state_test.go | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'state_test.go') diff --git a/state_test.go b/state_test.go index 21b3abd..b515ffb 100644 --- a/state_test.go +++ b/state_test.go @@ -68,7 +68,7 @@ func Test_server(t *testing.T) { stateCallback(t, old, new, data, state) }, false) - _, configErr := state.GetConfigInstituteAccess(serverURI, false) + _, _, configErr := state.GetConfigInstituteAccess(serverURI, false) if configErr != nil { t.Fatalf("Connect error: %v", configErr) @@ -91,7 +91,7 @@ func test_connect_oauth_parameter(t *testing.T, parameters internal.URLParameter } }, false) - _, configErr := state.GetConfigInstituteAccess(serverURI, false) + _, _, configErr := state.GetConfigInstituteAccess(serverURI, false) var stateErr *StateConnectError var loginErr *internal.OAuthLoginError @@ -171,7 +171,7 @@ func Test_token_expired(t *testing.T) { stateCallback(t, old, new, data, state) }, false) - _, configErr := state.GetConfigInstituteAccess(serverURI, false) + _, _, configErr := state.GetConfigInstituteAccess(serverURI, false) if configErr != nil { t.Fatalf("Connect error before expired: %v", configErr) @@ -219,7 +219,7 @@ func Test_token_invalid(t *testing.T) { stateCallback(t, old, new, data, state) }, false) - _, configErr := state.GetConfigInstituteAccess(serverURI, false) + _, _, configErr := state.GetConfigInstituteAccess(serverURI, false) if configErr != nil { t.Fatalf("Connect error before invalid: %v", configErr) @@ -243,7 +243,7 @@ func Test_token_invalid(t *testing.T) { oauth.Token.Access = dummy_value oauth.Token.Refresh = dummy_value - _, configErr = state.GetConfigInstituteAccess(serverURI, false) + _, _, configErr = state.GetConfigInstituteAccess(serverURI, false) if configErr != nil { t.Fatalf("Connect error after invalid: %v", configErr) @@ -269,7 +269,7 @@ func Test_invalid_profile_corrected(t *testing.T) { stateCallback(t, old, new, data, state) }, false) - _, configErr := state.GetConfigInstituteAccess(serverURI, false) + _, _, configErr := state.GetConfigInstituteAccess(serverURI, false) if configErr != nil { t.Fatalf("First connect error: %v", configErr) @@ -288,7 +288,7 @@ func Test_invalid_profile_corrected(t *testing.T) { previousProfile := base.Profiles.Current base.Profiles.Current = "IDONOTEXIST" - _, configErr = state.GetConfigInstituteAccess(serverURI, false) + _, _, configErr = state.GetConfigInstituteAccess(serverURI, false) if configErr != nil { t.Fatalf("Second connect error: %v", configErr) -- cgit v1.2.3