Commit 1be454e7 authored by Grzegorz Bizon's avatar Grzegorz Bizon

Fix envs and deploys specs related to build retry

parent b35e6249
...@@ -155,7 +155,7 @@ describe Environment, models: true do ...@@ -155,7 +155,7 @@ describe Environment, models: true do
end end
describe '#stop_with_action!' do describe '#stop_with_action!' do
let(:user) { create(:user) } let(:user) { create(:admin) }
subject { environment.stop_with_action!(user) } subject { environment.stop_with_action!(user) }
......
...@@ -234,7 +234,11 @@ describe CreateDeploymentService, services: true do ...@@ -234,7 +234,11 @@ describe CreateDeploymentService, services: true do
context 'when build is retried' do context 'when build is retried' do
it_behaves_like 'does create environment and deployment' 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 } subject { deployable.success }
end end
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment