Commit d96e9073 authored by Grzegorz Bizon's avatar Grzegorz Bizon

Fix specs for build status factory and manual status

parent 6c0fc62e
......@@ -218,9 +218,24 @@ describe Gitlab::Ci::Status::Build::Factory do
expect(status.favicon).to eq 'favicon_status_manual'
expect(status.label).to eq 'manual play action'
expect(status).to have_details
expect(status).to have_action
expect(status.action_path).to include 'play'
end
context 'when user has ability to play action' do
before do
build.project.add_master(user)
end
it 'fabricates status that has action' do
expect(status).to have_action
end
end
context 'when user does not have ability to play action' do
it 'fabricates status that has no action' do
expect(status).not_to have_action
end
end
end
context 'when build is an environment stop action' do
......
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