summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGrzegorz Bizon <grzesiek.bizon@gmail.com>2016-12-14 11:36:19 +0100
committerGrzegorz Bizon <grzesiek.bizon@gmail.com>2016-12-14 11:36:19 +0100
commit6757aaa120c375f15e09f4c428286e5dc1d95f84 (patch)
treeb403a0e71d1c1b434a9f4746770bc26b90c48835
parentac115a9e1f106863112ca9daf463a8f5b8db7d0a (diff)
downloadgitlab-ce-6757aaa120c375f15e09f4c428286e5dc1d95f84.tar.gz
Improve build status specs contexts descriptions
-rw-r--r--app/views/ci/status/_badge.html.haml2
-rw-r--r--spec/lib/gitlab/ci/status/build/cancelable_spec.rb2
-rw-r--r--spec/lib/gitlab/ci/status/build/play_spec.rb2
-rw-r--r--spec/lib/gitlab/ci/status/build/retryable_spec.rb2
-rw-r--r--spec/lib/gitlab/ci/status/build/stop_spec.rb2
5 files changed, 6 insertions, 4 deletions
diff --git a/app/views/ci/status/_badge.html.haml b/app/views/ci/status/_badge.html.haml
index c00ddd183fb..f2135af2686 100644
--- a/app/views/ci/status/_badge.html.haml
+++ b/app/views/ci/status/_badge.html.haml
@@ -1,3 +1,5 @@
+- status = local_assigns.fetch(:status)
+
- if status.has_details?
= link_to status.details_path, class: "ci-status ci-#{status}" do
= custom_icon(status.icon)
diff --git a/spec/lib/gitlab/ci/status/build/cancelable_spec.rb b/spec/lib/gitlab/ci/status/build/cancelable_spec.rb
index 989328c0719..9376bce17a1 100644
--- a/spec/lib/gitlab/ci/status/build/cancelable_spec.rb
+++ b/spec/lib/gitlab/ci/status/build/cancelable_spec.rb
@@ -65,7 +65,7 @@ describe Gitlab::Ci::Status::Build::Cancelable do
describe '.matches?' do
subject { described_class.matches?(build, user) }
- context 'build is cancelable' do
+ context 'when build is cancelable' do
let(:build) do
create(:ci_build, :running)
end
diff --git a/spec/lib/gitlab/ci/status/build/play_spec.rb b/spec/lib/gitlab/ci/status/build/play_spec.rb
index 0fa4405c604..4ddf04a8e11 100644
--- a/spec/lib/gitlab/ci/status/build/play_spec.rb
+++ b/spec/lib/gitlab/ci/status/build/play_spec.rb
@@ -51,7 +51,7 @@ describe Gitlab::Ci::Status::Build::Play do
describe '.matches?' do
subject { described_class.matches?(build, user) }
- context 'build is playable' do
+ context 'when build is playable' do
context 'when build stops an environment' do
let(:build) do
create(:ci_build, :playable, :teardown_environment)
diff --git a/spec/lib/gitlab/ci/status/build/retryable_spec.rb b/spec/lib/gitlab/ci/status/build/retryable_spec.rb
index 59f6b78f99d..d61e5bbaa6b 100644
--- a/spec/lib/gitlab/ci/status/build/retryable_spec.rb
+++ b/spec/lib/gitlab/ci/status/build/retryable_spec.rb
@@ -65,7 +65,7 @@ describe Gitlab::Ci::Status::Build::Retryable do
describe '.matches?' do
subject { described_class.matches?(build, user) }
- context 'build is retryable' do
+ context 'when build is retryable' do
let(:build) do
create(:ci_build, :success)
end
diff --git a/spec/lib/gitlab/ci/status/build/stop_spec.rb b/spec/lib/gitlab/ci/status/build/stop_spec.rb
index 984cd1e5007..59a85b55f90 100644
--- a/spec/lib/gitlab/ci/status/build/stop_spec.rb
+++ b/spec/lib/gitlab/ci/status/build/stop_spec.rb
@@ -53,7 +53,7 @@ describe Gitlab::Ci::Status::Build::Stop do
describe '.matches?' do
subject { described_class.matches?(build, user) }
- context 'build is playable' do
+ context 'when build is playable' do
context 'when build stops an environment' do
let(:build) do
create(:ci_build, :playable, :teardown_environment)