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/models/concerns | |
parent | 612f5e63b3cf76c354e50f4aa6c4163e5465b115 (diff) |
Updates from `rubocop -a`
Diffstat (limited to 'spec/models/concerns')
-rw-r--r-- | spec/models/concerns/batch_destroy_dependent_associations_spec.rb | 4 | ||||
-rw-r--r-- | spec/models/concerns/mentionable_spec.rb | 6 | ||||
-rw-r--r-- | spec/models/concerns/routable_spec.rb | 2 |
3 files changed, 6 insertions, 6 deletions
diff --git a/spec/models/concerns/batch_destroy_dependent_associations_spec.rb b/spec/models/concerns/batch_destroy_dependent_associations_spec.rb index c16b245bea8..e5392fe0462 100644 --- a/spec/models/concerns/batch_destroy_dependent_associations_spec.rb +++ b/spec/models/concerns/batch_destroy_dependent_associations_spec.rb @@ -4,8 +4,8 @@ describe BatchDestroyDependentAssociations do class TestProject < ActiveRecord::Base self.table_name = 'projects' - has_many :builds, dependent: :destroy # rubocop:disable Cop/ActiveRecordDependent - has_many :notification_settings, as: :source, dependent: :delete_all # rubocop:disable Cop/ActiveRecordDependent + has_many :builds, dependent: :destroy + has_many :notification_settings, as: :source, dependent: :delete_all has_many :pages_domains has_many :todos diff --git a/spec/models/concerns/mentionable_spec.rb b/spec/models/concerns/mentionable_spec.rb index c73ea6aa94c..a9b237fa9ea 100644 --- a/spec/models/concerns/mentionable_spec.rb +++ b/spec/models/concerns/mentionable_spec.rb @@ -136,7 +136,7 @@ describe Issue, "Mentionable" do expect(SystemNoteService).not_to receive(:cross_reference) - issue.update_attributes(description: 'New description') + issue.update(description: 'New description') issue.create_new_cross_references! end @@ -145,7 +145,7 @@ describe Issue, "Mentionable" do expect(SystemNoteService).to receive(:cross_reference).with(issues[1], any_args) - issue.update_attributes(description: issues[1].to_reference) + issue.update(description: issues[1].to_reference) issue.create_new_cross_references! end @@ -155,7 +155,7 @@ describe Issue, "Mentionable" do expect(SystemNoteService).to receive(:cross_reference).with(issues[1], any_args) - note.update_attributes(note: issues[1].to_reference) + note.update(note: issues[1].to_reference) note.create_new_cross_references! end end diff --git a/spec/models/concerns/routable_spec.rb b/spec/models/concerns/routable_spec.rb index 8cb50d7465c..ed3e28fbeca 100644 --- a/spec/models/concerns/routable_spec.rb +++ b/spec/models/concerns/routable_spec.rb @@ -29,7 +29,7 @@ describe Group, 'Routable' do end it 'updates route record on path change' do - group.update_attributes(path: 'wow', name: 'much') + group.update(path: 'wow', name: 'much') expect(group.route.path).to eq('wow') expect(group.route.name).to eq('much') |