diff options
author | Benjamin Neff <benjamin@coding4coffee.ch> | 2022-07-16 19:17:06 +0300 |
---|---|---|
committer | Benjamin Neff <benjamin@coding4coffee.ch> | 2022-07-20 22:26:58 +0300 |
commit | b5a46cf7bbd5e9a857e26443a40b5b1a6b696cb1 (patch) | |
tree | 3ecc4170d8d4e6d1b490561ee883b858d4c25894 /spec/workers | |
parent | 2d38a24a8688b3db5e8cba90e81a0eccd8086474 (diff) |
Fix deprecation warnings for rails 6.0
Diffstat (limited to 'spec/workers')
-rw-r--r-- | spec/workers/check_birthday_spec.rb | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/spec/workers/check_birthday_spec.rb b/spec/workers/check_birthday_spec.rb index 594be68f0..1f026ab61 100644 --- a/spec/workers/check_birthday_spec.rb +++ b/spec/workers/check_birthday_spec.rb @@ -7,7 +7,7 @@ describe Workers::CheckBirthday do before do Timecop.freeze(Time.zone.local(1999, 9, 9)) - birthday_profile.update_attributes(birthday: "1990-09-09") + birthday_profile.update(birthday: "1990-09-09") allow(Notifications::ContactsBirthday).to receive(:notify) end @@ -22,13 +22,13 @@ describe Workers::CheckBirthday do end it "does nothing if the birthday does not exist" do - birthday_profile.update_attributes(birthday: nil) + birthday_profile.update(birthday: nil) Workers::CheckBirthday.new.perform expect(Notifications::ContactsBirthday).not_to have_received(:notify) end it "does nothing if the person's birthday is not today" do - birthday_profile.update_attributes(birthday: "1988-04-15") + birthday_profile.update(birthday: "1988-04-15") Workers::CheckBirthday.new.perform expect(Notifications::ContactsBirthday).not_to have_received(:notify) end @@ -41,14 +41,14 @@ describe Workers::CheckBirthday do end it "does not call notify method if a contact user is not :receiving from the birthday person" do - contact2.update_attributes(receiving: false) + contact2.update(receiving: false) Workers::CheckBirthday.new.perform expect(Notifications::ContactsBirthday).to have_received(:notify).with(contact1, []) expect(Notifications::ContactsBirthday).not_to have_received(:notify).with(contact2, []) end it "does not call notify method if a birthday person is not :sharing with the contact user" do - contact2.update_attributes(sharing: false) + contact2.update(sharing: false) Workers::CheckBirthday.new.perform expect(Notifications::ContactsBirthday).to have_received(:notify).with(contact1, []) expect(Notifications::ContactsBirthday).not_to have_received(:notify).with(contact2, []) |