diff options
author | Lin Jen-Shin <godfat@godfat.org> | 2018-07-02 13:43:06 +0300 |
---|---|---|
committer | Lin Jen-Shin <godfat@godfat.org> | 2018-07-09 16:13:08 +0300 |
commit | 4ee08b77bc5ae11553d59c182ea8292b77699115 (patch) | |
tree | 3aac1871cd8dcefc88d52f11dcacbf238b2340a9 /spec/workers/repository_update_remote_mirror_worker_spec.rb | |
parent | 612f5e63b3cf76c354e50f4aa6c4163e5465b115 (diff) |
Updates from `rubocop -a`
Diffstat (limited to 'spec/workers/repository_update_remote_mirror_worker_spec.rb')
-rw-r--r-- | spec/workers/repository_update_remote_mirror_worker_spec.rb | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/spec/workers/repository_update_remote_mirror_worker_spec.rb b/spec/workers/repository_update_remote_mirror_worker_spec.rb index 152ba2509b9..4f1ad2474f5 100644 --- a/spec/workers/repository_update_remote_mirror_worker_spec.rb +++ b/spec/workers/repository_update_remote_mirror_worker_spec.rb @@ -13,7 +13,7 @@ describe RepositoryUpdateRemoteMirrorWorker do describe '#perform' do context 'with status none' do before do - remote_mirror.update_attributes(update_status: 'none') + remote_mirror.update(update_status: 'none') end it 'sets status as finished when update remote mirror service executes successfully' do @@ -34,7 +34,7 @@ describe RepositoryUpdateRemoteMirrorWorker do end it 'does nothing if last_update_started_at is higher than the time the job was scheduled in' do - remote_mirror.update_attributes(last_update_started_at: Time.now) + remote_mirror.update(last_update_started_at: Time.now) expect_any_instance_of(RemoteMirror).to receive(:updated_since?).with(scheduled_time).and_return(true) expect_any_instance_of(Projects::UpdateRemoteMirrorService).not_to receive(:execute).with(remote_mirror) @@ -56,7 +56,7 @@ describe RepositoryUpdateRemoteMirrorWorker do context 'with another worker already running' do before do - remote_mirror.update_attributes(update_status: 'started') + remote_mirror.update(update_status: 'started') end it 'raises RemoteMirrorUpdateAlreadyInProgressError' do @@ -68,11 +68,11 @@ describe RepositoryUpdateRemoteMirrorWorker do context 'with status failed' do before do - remote_mirror.update_attributes(update_status: 'failed') + remote_mirror.update(update_status: 'failed') end it 'sets status as finished if last_update_started_at is higher than the time the job was scheduled in' do - remote_mirror.update_attributes(last_update_started_at: Time.now) + remote_mirror.update(last_update_started_at: Time.now) expect_any_instance_of(RemoteMirror).to receive(:updated_since?).with(scheduled_time).and_return(false) expect_any_instance_of(Projects::UpdateRemoteMirrorService).to receive(:execute).with(remote_mirror).and_return(status: :success) |