Commit fefc3e9e authored by Kamil Trzcinski's avatar Kamil Trzcinski

Make sure that we test RegisterBuildService behavior for deleted projects

parent 78d5828f
...@@ -45,6 +45,28 @@ module Ci ...@@ -45,6 +45,28 @@ module Ci
end end
end end
context 'deleted projects' do
before do
project.update(pending_delete: true)
end
context 'for shared runners' do
before do
project.update(shared_runners_enabled: true)
end
it 'does not pick a build' do
expect(service.execute(shared_runner)).to be_nil
end
end
context 'for specific runner' do
it 'does not pick a build' do
expect(service.execute(specific_runner)).to be_nil
end
end
end
context 'allow shared runners' do context 'allow shared runners' do
before do before do
project.update(shared_runners_enabled: true) project.update(shared_runners_enabled: true)
......
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