diff options
author | Luke Bennett <lbennett@gitlab.com> | 2019-03-21 22:24:48 +0000 |
---|---|---|
committer | Luke Bennett <lbennett@gitlab.com> | 2019-05-07 03:42:09 +0100 |
commit | 875338487343b092f670ab5e0323904ec5457a3a (patch) | |
tree | f625635a4198e9d6a884fa6bfe73630ab49af978 /spec/models | |
parent | 4ebbfb9f1e95091a7753a10e12d989d72f4332f8 (diff) | |
download | gitlab-ce-875338487343b092f670ab5e0323904ec5457a3a.tar.gz |
Show disabled project repo mirrorsshow-disabled-mirrors
Show disabled mirrors with a badge so that they
can be deleted by project owners.
Diffstat (limited to 'spec/models')
-rw-r--r-- | spec/models/remote_mirror_spec.rb | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/spec/models/remote_mirror_spec.rb b/spec/models/remote_mirror_spec.rb index f743dfed31f..e14b19db915 100644 --- a/spec/models/remote_mirror_spec.rb +++ b/spec/models/remote_mirror_spec.rb @@ -373,6 +373,22 @@ describe RemoteMirror, :mailer do end end + describe '#disabled?' do + subject { remote_mirror.disabled? } + + context 'when disabled' do + let(:remote_mirror) { build(:remote_mirror, enabled: false) } + + it { is_expected.to be_truthy } + end + + context 'when enabled' do + let(:remote_mirror) { build(:remote_mirror, enabled: true) } + + it { is_expected.to be_falsy } + end + end + def create_mirror(params) project = FactoryBot.create(:project, :repository) project.remote_mirrors.create!(params) |