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/support/api | |
parent | 612f5e63b3cf76c354e50f4aa6c4163e5465b115 (diff) |
Updates from `rubocop -a`
Diffstat (limited to 'spec/support/api')
-rw-r--r-- | spec/support/api/repositories_shared_context.rb | 2 | ||||
-rw-r--r-- | spec/support/api/time_tracking_shared_examples.rb | 8 |
2 files changed, 5 insertions, 5 deletions
diff --git a/spec/support/api/repositories_shared_context.rb b/spec/support/api/repositories_shared_context.rb index ea38fe4f5b8..f1341804e56 100644 --- a/spec/support/api/repositories_shared_context.rb +++ b/spec/support/api/repositories_shared_context.rb @@ -1,6 +1,6 @@ shared_context 'disabled repository' do before do - project.project_feature.update_attributes!( + project.project_feature.update!( repository_access_level: ProjectFeature::DISABLED, merge_requests_access_level: ProjectFeature::DISABLED, builds_access_level: ProjectFeature::DISABLED diff --git a/spec/support/api/time_tracking_shared_examples.rb b/spec/support/api/time_tracking_shared_examples.rb index 52e1bc55191..fee464c15a3 100644 --- a/spec/support/api/time_tracking_shared_examples.rb +++ b/spec/support/api/time_tracking_shared_examples.rb @@ -85,7 +85,7 @@ shared_examples 'time tracking endpoints' do |issuable_name| it 'subtracts time of the total spent time' do Timecop.travel(1.minute.from_now) do expect do - issuable.update_attributes!(spend_time: { duration: 7200, user_id: user.id }) + issuable.update!(spend_time: { duration: 7200, user_id: user.id }) end.to change { issuable.reload.updated_at } end @@ -99,7 +99,7 @@ shared_examples 'time tracking endpoints' do |issuable_name| context 'when time to subtract is greater than the total spent time' do it 'does not modify the total time spent' do - issuable.update_attributes!(spend_time: { duration: 7200, user_id: user.id }) + issuable.update!(spend_time: { duration: 7200, user_id: user.id }) Timecop.travel(1.minute.from_now) do expect do @@ -135,8 +135,8 @@ shared_examples 'time tracking endpoints' do |issuable_name| describe "GET /projects/:id/#{issuable_collection_name}/:#{issuable_name}_id/time_stats" do it "returns the time stats for #{issuable_name}" do - issuable.update_attributes!(spend_time: { duration: 1800, user_id: user.id }, - time_estimate: 3600) + issuable.update!(spend_time: { duration: 1800, user_id: user.id }, + time_estimate: 3600) get api("/projects/#{project.id}/#{issuable_collection_name}/#{issuable.iid}/time_stats", user) |