Skip to content
Snippets Groups Projects
Commit 6757aaa1 authored by Grzegorz Bizon's avatar Grzegorz Bizon
Browse files

Improve build status specs contexts descriptions

parent ac115a9e
No related branches found
No related tags found
No related merge requests found
- status = local_assigns.fetch(:status)
- if status.has_details? - if status.has_details?
= link_to status.details_path, class: "ci-status ci-#{status}" do = link_to status.details_path, class: "ci-status ci-#{status}" do
= custom_icon(status.icon) = custom_icon(status.icon)
Loading
Loading
Loading
@@ -65,7 +65,7 @@ describe Gitlab::Ci::Status::Build::Cancelable do
Loading
@@ -65,7 +65,7 @@ describe Gitlab::Ci::Status::Build::Cancelable do
describe '.matches?' do describe '.matches?' do
subject { described_class.matches?(build, user) } subject { described_class.matches?(build, user) }
   
context 'build is cancelable' do context 'when build is cancelable' do
let(:build) do let(:build) do
create(:ci_build, :running) create(:ci_build, :running)
end end
Loading
Loading
Loading
@@ -51,7 +51,7 @@ describe Gitlab::Ci::Status::Build::Play do
Loading
@@ -51,7 +51,7 @@ describe Gitlab::Ci::Status::Build::Play do
describe '.matches?' do describe '.matches?' do
subject { described_class.matches?(build, user) } subject { described_class.matches?(build, user) }
   
context 'build is playable' do context 'when build is playable' do
context 'when build stops an environment' do context 'when build stops an environment' do
let(:build) do let(:build) do
create(:ci_build, :playable, :teardown_environment) create(:ci_build, :playable, :teardown_environment)
Loading
Loading
Loading
@@ -65,7 +65,7 @@ describe Gitlab::Ci::Status::Build::Retryable do
Loading
@@ -65,7 +65,7 @@ describe Gitlab::Ci::Status::Build::Retryable do
describe '.matches?' do describe '.matches?' do
subject { described_class.matches?(build, user) } subject { described_class.matches?(build, user) }
   
context 'build is retryable' do context 'when build is retryable' do
let(:build) do let(:build) do
create(:ci_build, :success) create(:ci_build, :success)
end end
Loading
Loading
Loading
@@ -53,7 +53,7 @@ describe Gitlab::Ci::Status::Build::Stop do
Loading
@@ -53,7 +53,7 @@ describe Gitlab::Ci::Status::Build::Stop do
describe '.matches?' do describe '.matches?' do
subject { described_class.matches?(build, user) } subject { described_class.matches?(build, user) }
   
context 'build is playable' do context 'when build is playable' do
context 'when build stops an environment' do context 'when build stops an environment' do
let(:build) do let(:build) do
create(:ci_build, :playable, :teardown_environment) create(:ci_build, :playable, :teardown_environment)
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment