diff options
author | 2023-11-10 17:42:48 +0100 | |
---|---|---|
committer | 2023-11-10 16:42:48 +0000 | |
commit | c7ecab9e6fb76bb10da26c803fc5838419642423 (patch) | |
tree | 41410d639bdb8b19a93e972a6d05937f82ab4299 /internal/api/auth/token_test.go | |
parent | [bugfix] Don't try to update suspended accounts (#2348) (diff) | |
download | gotosocial-c7ecab9e6fb76bb10da26c803fc5838419642423.tar.xz |
[chore/bugfix/horror] Allow `expires_in` and poll choices to be parsed from strings (#2346)
Diffstat (limited to 'internal/api/auth/token_test.go')
-rw-r--r-- | internal/api/auth/token_test.go | 44 |
1 files changed, 22 insertions, 22 deletions
diff --git a/internal/api/auth/token_test.go b/internal/api/auth/token_test.go index e319c2d02..c97fce3b9 100644 --- a/internal/api/auth/token_test.go +++ b/internal/api/auth/token_test.go @@ -58,11 +58,11 @@ func (suite *TokenTestSuite) TestRetrieveClientCredentialsOK() { requestBody, w, err := testrig.CreateMultipartFormData( "", "", - map[string]string{ - "grant_type": "client_credentials", - "client_id": testClient.ID, - "client_secret": testClient.Secret, - "redirect_uri": "http://localhost:8080", + map[string][]string{ + "grant_type": {"client_credentials"}, + "client_id": {testClient.ID}, + "client_secret": {testClient.Secret}, + "redirect_uri": {"http://localhost:8080"}, }) if err != nil { panic(err) @@ -104,12 +104,12 @@ func (suite *TokenTestSuite) TestRetrieveAuthorizationCodeOK() { requestBody, w, err := testrig.CreateMultipartFormData( "", "", - map[string]string{ - "grant_type": "authorization_code", - "client_id": testClient.ID, - "client_secret": testClient.Secret, - "redirect_uri": "http://localhost:8080", - "code": testUserAuthorizationToken.Code, + map[string][]string{ + "grant_type": {"authorization_code"}, + "client_id": {testClient.ID}, + "client_secret": {testClient.Secret}, + "redirect_uri": {"http://localhost:8080"}, + "code": {testUserAuthorizationToken.Code}, }) if err != nil { panic(err) @@ -149,11 +149,11 @@ func (suite *TokenTestSuite) TestRetrieveAuthorizationCodeNoCode() { requestBody, w, err := testrig.CreateMultipartFormData( "", "", - map[string]string{ - "grant_type": "authorization_code", - "client_id": testClient.ID, - "client_secret": testClient.Secret, - "redirect_uri": "http://localhost:8080", + map[string][]string{ + "grant_type": {"authorization_code"}, + "client_id": {testClient.ID}, + "client_secret": {testClient.Secret}, + "redirect_uri": {"http://localhost:8080"}, }) if err != nil { panic(err) @@ -181,12 +181,12 @@ func (suite *TokenTestSuite) TestRetrieveAuthorizationCodeWrongGrantType() { requestBody, w, err := testrig.CreateMultipartFormData( "", "", - map[string]string{ - "grant_type": "client_credentials", - "client_id": testClient.ID, - "client_secret": testClient.Secret, - "redirect_uri": "http://localhost:8080", - "code": "peepeepoopoo", + map[string][]string{ + "grant_type": {"client_credentials"}, + "client_id": {testClient.ID}, + "client_secret": {testClient.Secret}, + "redirect_uri": {"http://localhost:8080"}, + "code": {"peepeepoopoo"}, }) if err != nil { panic(err) |