diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2020-06-18 15:09:25 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2020-06-18 15:09:25 +0300 |
commit | 8eef083ccd59505b606e9733d38589cbd3d01fdf (patch) | |
tree | 72cc132b2bb3a60a8802d6af80c49953d7084afd /spec/models | |
parent | e1d53af7ad463decf1df2944343c66b27512d4e1 (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/models')
-rw-r--r-- | spec/models/personal_access_token_spec.rb | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/spec/models/personal_access_token_spec.rb b/spec/models/personal_access_token_spec.rb index a3f5eb38511..6fe4bb443a4 100644 --- a/spec/models/personal_access_token_spec.rb +++ b/spec/models/personal_access_token_spec.rb @@ -187,6 +187,20 @@ describe PersonalAccessToken do expect(described_class.without_impersonation).to contain_exactly(personal_access_token) end end + + describe 'revoke scopes' do + let_it_be(:revoked_token) { create(:personal_access_token, :revoked) } + let_it_be(:non_revoked_token) { create(:personal_access_token, revoked: false) } + let_it_be(:non_revoked_token2) { create(:personal_access_token, revoked: nil) } + + describe '.revoked' do + it { expect(described_class.revoked).to contain_exactly(revoked_token) } + end + + describe '.not_revoked' do + it { expect(described_class.not_revoked).to contain_exactly(non_revoked_token, non_revoked_token2) } + end + end end describe '.simple_sorts' do |