Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/spec
diff options
context:
space:
mode:
authorGrzegorz Bizon <grzesiek.bizon@gmail.com>2016-05-06 10:17:27 +0300
committerGrzegorz Bizon <grzesiek.bizon@gmail.com>2016-05-19 23:01:53 +0300
commit8001eed06e5871f1cb108ceb70213c8b3f9192d2 (patch)
tree4c9aeb9857ccc41fc333deaad2d0783a44ee9dc9 /spec
parent8252333183dcff74fd229ca81e7317641ad30791 (diff)
Add method that check if build has tags
Diffstat (limited to 'spec')
-rw-r--r--spec/models/build_spec.rb12
1 files changed, 12 insertions, 0 deletions
diff --git a/spec/models/build_spec.rb b/spec/models/build_spec.rb
index 5da54e07de8..abae3271a5c 100644
--- a/spec/models/build_spec.rb
+++ b/spec/models/build_spec.rb
@@ -309,6 +309,18 @@ describe Ci::Build, models: true do
end
end
+ describe '#has_tags?' do
+ context 'when build has tags' do
+ subject { create(:ci_build, tag_list: ['tag']) }
+ it { is_expected.to have_tags }
+ end
+
+ context 'when build does not have tags' do
+ subject { create(:ci_build, tag_list: []) }
+ it { is_expected.to_not have_tags }
+ end
+ end
+
describe '#any_runners_online?' do
subject { build.any_runners_online? }