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:
authorMayra Cabrera <mcabrera@gitlab.com>2018-04-06 06:02:13 +0300
committerMayra Cabrera <mcabrera@gitlab.com>2018-04-07 05:20:17 +0300
commitc4f56a88029c1fe73bf6efb062b5f77a65282fed (patch)
tree890a869e8ce06a5438b38c8e9dca9529362cc2f4 /spec/services/deploy_tokens
parenta475411f4380ef4d0260940206e2553da3b2f3ee (diff)
Increase test suite around deploy tokens behavior
Also, fixes broken specs
Diffstat (limited to 'spec/services/deploy_tokens')
-rw-r--r--spec/services/deploy_tokens/create_service_spec.rb28
1 files changed, 0 insertions, 28 deletions
diff --git a/spec/services/deploy_tokens/create_service_spec.rb b/spec/services/deploy_tokens/create_service_spec.rb
index 4830f17faa8..2a308a9bf8c 100644
--- a/spec/services/deploy_tokens/create_service_spec.rb
+++ b/spec/services/deploy_tokens/create_service_spec.rb
@@ -20,20 +20,6 @@ describe DeployTokens::CreateService, :clean_gitlab_redis_shared_state do
it 'returns a DeployToken' do
expect(subject).to be_an_instance_of DeployToken
end
-
- it 'should store the token on redis' do
- redis_key = DeployToken.redis_shared_state_key(user.id)
- subject
-
- expect(Gitlab::Redis::SharedState.with { |redis| redis.get(redis_key) }).not_to be_nil
- end
-
- it 'should not store deploy token attributes on redis' do
- redis_key = DeployToken.redis_shared_state_key(user.id) + ":attributes"
- subject
-
- expect(Gitlab::Redis::SharedState.with { |redis| redis.get(redis_key) }).to be_nil
- end
end
context 'when the deploy token is invalid' do
@@ -46,20 +32,6 @@ describe DeployTokens::CreateService, :clean_gitlab_redis_shared_state do
it 'should not create a new ProjectDeployToken' do
expect { subject }.not_to change { ProjectDeployToken.count }
end
-
- it 'should not store the token on redis' do
- redis_key = DeployToken.redis_shared_state_key(user.id)
- subject
-
- expect(Gitlab::Redis::SharedState.with { |redis| redis.get(redis_key) }).to be_nil
- end
-
- it 'should store deploy token attributes on redis' do
- redis_key = DeployToken.redis_shared_state_key(user.id) + ":attributes"
- subject
-
- expect(Gitlab::Redis::SharedState.with { |redis| redis.get(redis_key) }).not_to be_nil
- end
end
end
end