Commit ae0e1e40 authored by Lin Jen-Shin's avatar Lin Jen-Shin
parent 4852acef
...@@ -107,6 +107,7 @@ describe Ci::Runner, models: true do ...@@ -107,6 +107,7 @@ describe Ci::Runner, models: true do
it 'cannot handle build with tags' do it 'cannot handle build with tags' do
build.tag_list = ['aa'] build.tag_list = ['aa']
expect(runner.can_pick?(build)).to be_falsey expect(runner.can_pick?(build)).to be_falsey
end end
end end
...@@ -119,11 +120,13 @@ describe Ci::Runner, models: true do ...@@ -119,11 +120,13 @@ describe Ci::Runner, models: true do
shared_examples 'tagged build picker' do shared_examples 'tagged build picker' do
it 'can handle build with matching tags' do it 'can handle build with matching tags' do
build.tag_list = ['bb'] build.tag_list = ['bb']
expect(runner.can_pick?(build)).to be_truthy expect(runner.can_pick?(build)).to be_truthy
end end
it 'cannot handle build without matching tags' do it 'cannot handle build without matching tags' do
build.tag_list = ['aa'] build.tag_list = ['aa']
expect(runner.can_pick?(build)).to be_falsey expect(runner.can_pick?(build)).to be_falsey
end end
end end
...@@ -172,6 +175,7 @@ describe Ci::Runner, models: true do ...@@ -172,6 +175,7 @@ describe Ci::Runner, models: true do
it 'cannot handle it for builds without matching tags' do it 'cannot handle it for builds without matching tags' do
build.tag_list = ['aa'] build.tag_list = ['aa']
expect(runner.can_pick?(build)).to be_falsey expect(runner.can_pick?(build)).to be_falsey
end end
end end
......
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