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 ...@@ -442,16 +442,18 @@ RSpec.describe RemoteMirror, :mailer do
end end
describe '#disabled?' do describe '#disabled?' do
let_it_be(:project) { create(:project, :repository) }
subject { remote_mirror.disabled? } subject { remote_mirror.disabled? }
context 'when disabled' do 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 } it { is_expected.to be_truthy }
end end
context 'when enabled' do 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 } it { is_expected.to be_falsy }
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