diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2021-11-18 13:16:36 +0000 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2021-11-18 13:16:36 +0000 |
commit | 311b0269b4eb9839fa63f80c8d7a58f32b8138a0 (patch) | |
tree | 07e7870bca8aed6d61fdcc810731c50d2c40af47 /spec/models/remote_mirror_spec.rb | |
parent | 27909cef6c4170ed9205afa7426b8d3de47cbb0c (diff) | |
download | gitlab-ce-311b0269b4eb9839fa63f80c8d7a58f32b8138a0.tar.gz |
Add latest changes from gitlab-org/gitlab@14-5-stable-eev14.5.0-rc42
Diffstat (limited to 'spec/models/remote_mirror_spec.rb')
-rw-r--r-- | spec/models/remote_mirror_spec.rb | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/spec/models/remote_mirror_spec.rb b/spec/models/remote_mirror_spec.rb index 382359ccb17..9f1d1c84da3 100644 --- a/spec/models/remote_mirror_spec.rb +++ b/spec/models/remote_mirror_spec.rb @@ -289,7 +289,7 @@ RSpec.describe RemoteMirror, :mailer do context 'with remote mirroring disabled' do it 'returns nil' do - remote_mirror.update(enabled: false) + remote_mirror.update!(enabled: false) expect(remote_mirror.sync).to be_nil end @@ -354,7 +354,7 @@ RSpec.describe RemoteMirror, :mailer do let(:remote_mirror) { create(:project, :repository, :remote_mirror).remote_mirrors.first } it 'resets all the columns when URL changes' do - remote_mirror.update(last_error: Time.current, + remote_mirror.update!(last_error: Time.current, last_update_at: Time.current, last_successful_update_at: Time.current, update_status: 'started', @@ -378,7 +378,7 @@ RSpec.describe RemoteMirror, :mailer do end before do - remote_mirror.update(last_update_started_at: Time.current) + remote_mirror.update!(last_update_started_at: Time.current) end context 'when remote mirror does not have status failed' do @@ -393,7 +393,7 @@ RSpec.describe RemoteMirror, :mailer do context 'when remote mirror has status failed' do it 'returns false when last update started after the timestamp' do - remote_mirror.update(update_status: 'failed') + remote_mirror.update!(update_status: 'failed') expect(remote_mirror.updated_since?(timestamp)).to be false end @@ -409,7 +409,7 @@ RSpec.describe RemoteMirror, :mailer do updated_at: 25.hours.ago) project = mirror.project project.pending_delete = true - project.save + project.save! mirror.reload expect(mirror.sync).to be_nil |