mirror of
https://github.com/discourse/discourse.git
synced 2025-02-25 18:55:32 -06:00
DEV: Fix mocha deprecations (#18828)
It now supports strict keyword argument matching by default.
This commit is contained in:
@@ -1289,12 +1289,12 @@ RSpec.describe Report do
|
||||
end
|
||||
|
||||
it "caches exception reports for 1 minute" do
|
||||
Discourse.cache.expects(:write).with(Report.cache_key(exception_report), exception_report.as_json, { expires_in: 1.minute })
|
||||
Discourse.cache.expects(:write).with(Report.cache_key(exception_report), exception_report.as_json, expires_in: 1.minute)
|
||||
Report.cache(exception_report)
|
||||
end
|
||||
|
||||
it "caches valid reports for 35 minutes" do
|
||||
Discourse.cache.expects(:write).with(Report.cache_key(valid_report), valid_report.as_json, { expires_in: 35.minutes })
|
||||
Discourse.cache.expects(:write).with(Report.cache_key(valid_report), valid_report.as_json, expires_in: 35.minutes)
|
||||
Report.cache(valid_report)
|
||||
end
|
||||
end
|
||||
|
||||
@@ -138,7 +138,7 @@ RSpec.describe ReviewableUser, type: :model do
|
||||
|
||||
it "optionally sends email with reject reason" do
|
||||
SiteSetting.must_approve_users = true
|
||||
Jobs::CriticalUserEmail.any_instance.expects(:execute).with(type: :signup_after_reject, user_id: reviewable.target_id, reject_reason: "reject reason").once
|
||||
Jobs::CriticalUserEmail.any_instance.expects(:execute).with({ type: :signup_after_reject, user_id: reviewable.target_id, reject_reason: "reject reason" }).once
|
||||
reviewable.perform(moderator, :delete_user_block, reject_reason: "reject reason", send_email: true)
|
||||
end
|
||||
|
||||
|
||||
Reference in New Issue
Block a user