Commit adc860ae authored by Kamil Trzciński's avatar Kamil Trzciński Committed by Dylan Griffith

Ensure that we can remove degenerate runners

parent 5805e922
......@@ -764,4 +764,20 @@ describe Ci::Runner do
end
end
end
describe 'project runner without projects is destroyable' do
subject { create(:ci_runner, :project) }
before do
subject.runner_projects.delete_all
end
it 'does not have projects' do
expect(subject.runner_projects).to be_empty
end
it 'can be destroyed' do
expect { subject.destroy }.to change { Ci::Runner.count }.by(-1)
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