diff options
author | wxiaoguang <wxiaoguang@gmail.com> | 2024-11-26 10:03:02 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-11-26 02:03:02 +0000 |
commit | 9ed768adc426636b6fbcdb389ba89ba039bc7da3 (patch) | |
tree | dbe6d747fbf1460cfbc3e3155cf2611a41e62caf /tests | |
parent | 25cacaf0aa56bece904c84638fbe126a826c1cd8 (diff) | |
download | gitea-9ed768adc426636b6fbcdb389ba89ba039bc7da3.tar.gz gitea-9ed768adc426636b6fbcdb389ba89ba039bc7da3.zip |
Improve oauth2 scope token handling (#32633)
Diffstat (limited to 'tests')
-rw-r--r-- | tests/integration/oauth_test.go | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/tests/integration/oauth_test.go b/tests/integration/oauth_test.go index feb262b50e..f177bd3a23 100644 --- a/tests/integration/oauth_test.go +++ b/tests/integration/oauth_test.go @@ -565,7 +565,7 @@ func TestOAuth_GrantScopesReadUserFailRepos(t *testing.T) { errorParsed := new(errorResponse) require.NoError(t, json.Unmarshal(errorResp.Body.Bytes(), errorParsed)) - assert.Contains(t, errorParsed.Message, "token does not have at least one of required scope(s): [read:repository]") + assert.Contains(t, errorParsed.Message, "token does not have at least one of required scope(s), required=[read:repository]") } func TestOAuth_GrantScopesReadRepositoryFailOrganization(t *testing.T) { @@ -708,7 +708,7 @@ func TestOAuth_GrantScopesReadRepositoryFailOrganization(t *testing.T) { errorParsed := new(errorResponse) require.NoError(t, json.Unmarshal(errorResp.Body.Bytes(), errorParsed)) - assert.Contains(t, errorParsed.Message, "token does not have at least one of required scope(s): [read:user read:organization]") + assert.Contains(t, errorParsed.Message, "token does not have at least one of required scope(s), required=[read:user read:organization]") } func TestOAuth_GrantScopesClaimPublicOnlyGroups(t *testing.T) { |