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>2023-09-25 15:09:24 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2023-09-25 15:09:24 +0300
commit7a3aca2b5b3bfdebbd7bb6353d5bdcdc422670da (patch)
treed3431811140c48c2ed31f2e8fdc90504f3bd4344 /spec/models/clusters
parent9c3a433b3176e895a23cf0f4b87411b44e264397 (diff)
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/models/clusters')
-rw-r--r--spec/models/clusters/agent_token_spec.rb9
1 files changed, 9 insertions, 0 deletions
diff --git a/spec/models/clusters/agent_token_spec.rb b/spec/models/clusters/agent_token_spec.rb
index bc158fc9117..5f731336b4b 100644
--- a/spec/models/clusters/agent_token_spec.rb
+++ b/spec/models/clusters/agent_token_spec.rb
@@ -95,6 +95,15 @@ RSpec.describe Clusters::AgentToken, feature_category: :deployment_management do
expect(agent_token.token).to start_with described_class::TOKEN_PREFIX
end
+
+ it 'is revoked on revoke!' do
+ agent_token = build(:cluster_agent_token, token_encrypted: nil)
+ agent_token.save!
+
+ agent_token.revoke!
+
+ expect(agent_token.active?).to be_falsey
+ end
end
describe '#to_ability_name' do