summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLin Jen-Shin <godfat@godfat.org>2016-06-16 23:26:49 +0800
committerLin Jen-Shin <godfat@godfat.org>2016-06-16 23:26:49 +0800
commitae0e1e402e1f754943ad200958f85bc90ca82b52 (patch)
treea9ffcca4ce289a3b0a6861d10460a8dd6b746572
parent4852acef9256ee60d76564ff7509dc72e016a863 (diff)
downloadgitlab-ce-ae0e1e402e1f754943ad200958f85bc90ca82b52.tar.gz
blank line between setup and expectation, feedback:
https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/4093/diffs#note_12501266 and: https://robots.thoughtbot.com/four-phase-test
-rw-r--r--spec/models/ci/runner_spec.rb4
1 files changed, 4 insertions, 0 deletions
diff --git a/spec/models/ci/runner_spec.rb b/spec/models/ci/runner_spec.rb
index c3638bf407f..2b21c3561db 100644
--- a/spec/models/ci/runner_spec.rb
+++ b/spec/models/ci/runner_spec.rb
@@ -107,6 +107,7 @@ describe Ci::Runner, models: true do
it 'cannot handle build with tags' do
build.tag_list = ['aa']
+
expect(runner.can_pick?(build)).to be_falsey
end
end
@@ -119,11 +120,13 @@ describe Ci::Runner, models: true do
shared_examples 'tagged build picker' do
it 'can handle build with matching tags' do
build.tag_list = ['bb']
+
expect(runner.can_pick?(build)).to be_truthy
end
it 'cannot handle build without matching tags' do
build.tag_list = ['aa']
+
expect(runner.can_pick?(build)).to be_falsey
end
end
@@ -172,6 +175,7 @@ describe Ci::Runner, models: true do
it 'cannot handle it for builds without matching tags' do
build.tag_list = ['aa']
+
expect(runner.can_pick?(build)).to be_falsey
end
end