Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2020-06-18 15:09:25 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2020-06-18 15:09:25 +0300
commit8eef083ccd59505b606e9733d38589cbd3d01fdf (patch)
tree72cc132b2bb3a60a8802d6af80c49953d7084afd /spec/models
parente1d53af7ad463decf1df2944343c66b27512d4e1 (diff)
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/models')
-rw-r--r--spec/models/personal_access_token_spec.rb14
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