Commit 52368d34 authored by Heinrich Lee Yu's avatar Heinrich Lee Yu Committed by Eugenia Grieff

Fix remote mirror spec

These tests require a persisted project to work
parent bba75738
......@@ -442,16 +442,18 @@ RSpec.describe RemoteMirror, :mailer do
end
describe '#disabled?' do
let_it_be(:project) { create(:project, :repository) }
subject { remote_mirror.disabled? }
context 'when disabled' do
let(:remote_mirror) { build(:remote_mirror, enabled: false) }
let(:remote_mirror) { build(:remote_mirror, project: project, enabled: false) }
it { is_expected.to be_truthy }
end
context 'when enabled' do
let(:remote_mirror) { build(:remote_mirror, enabled: true) }
let(:remote_mirror) { build(:remote_mirror, project: project, enabled: true) }
it { is_expected.to be_falsy }
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