diff options
author | Grzegorz Bizon <grzesiek.bizon@gmail.com> | 2017-02-13 15:12:08 +0100 |
---|---|---|
committer | Grzegorz Bizon <grzesiek.bizon@gmail.com> | 2017-02-13 15:12:08 +0100 |
commit | 1be454e71272f1a6489883e9d4b27c40c6277591 (patch) | |
tree | 52f770d173449327fae33f28f4b95188cf70bf7d /spec | |
parent | b35e62491316ff92379a26b504144d3a2f2a11bf (diff) | |
download | gitlab-ce-1be454e71272f1a6489883e9d4b27c40c6277591.tar.gz |
Fix envs and deploys specs related to build retry
Diffstat (limited to 'spec')
-rw-r--r-- | spec/models/environment_spec.rb | 2 | ||||
-rw-r--r-- | spec/services/create_deployment_service_spec.rb | 6 |
2 files changed, 6 insertions, 2 deletions
diff --git a/spec/models/environment_spec.rb b/spec/models/environment_spec.rb index 960f29f3805..f0ed0c679d5 100644 --- a/spec/models/environment_spec.rb +++ b/spec/models/environment_spec.rb @@ -155,7 +155,7 @@ describe Environment, models: true do end describe '#stop_with_action!' do - let(:user) { create(:user) } + let(:user) { create(:admin) } subject { environment.stop_with_action!(user) } diff --git a/spec/services/create_deployment_service_spec.rb b/spec/services/create_deployment_service_spec.rb index cf0a18aacec..50679408dca 100644 --- a/spec/services/create_deployment_service_spec.rb +++ b/spec/services/create_deployment_service_spec.rb @@ -234,7 +234,11 @@ describe CreateDeploymentService, services: true do context 'when build is retried' do it_behaves_like 'does create environment and deployment' do - let(:deployable) { Ci::Build.retry(build) } + before do + project.team << [user, :developer] + end + + let(:deployable) { Ci::Build.retry(build, user) } subject { deployable.success } end |