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:
@@ -53,14 +53,14 @@ RSpec.describe SiteSettings::YamlLoader do
|
||||
end
|
||||
|
||||
it "can load client settings" do
|
||||
receiver.expects(:setting).with('category1', 'title', 'Discourse', client: true)
|
||||
receiver.expects(:setting).with('category2', 'tos_url', '', client: true)
|
||||
receiver.expects(:setting).with('category2', 'must_approve_users', false, client: true)
|
||||
receiver.expects(:setting).with('category1', 'title', 'Discourse', { client: true })
|
||||
receiver.expects(:setting).with('category2', 'tos_url', '', { client: true })
|
||||
receiver.expects(:setting).with('category2', 'must_approve_users', false, { client: true })
|
||||
receiver.load_yaml(client)
|
||||
end
|
||||
|
||||
it "can load enum settings" do
|
||||
receiver.expects(:setting).with('email', 'default_email_digest_frequency', 7, enum: 'DigestEmailSiteSetting')
|
||||
receiver.expects(:setting).with('email', 'default_email_digest_frequency', 7, { enum: 'DigestEmailSiteSetting' })
|
||||
receiver.load_yaml(enum)
|
||||
end
|
||||
|
||||
@@ -76,7 +76,7 @@ RSpec.describe SiteSettings::YamlLoader do
|
||||
end
|
||||
|
||||
it "can load settings with locale default" do
|
||||
receiver.expects(:setting).with('search', 'min_search_term_length', 3, min: 2, client: true, locale_default: { zh_CN: 2, zh_TW: 2 })
|
||||
receiver.expects(:setting).with('search', 'min_search_term_length', 3, { min: 2, client: true, locale_default: { zh_CN: 2, zh_TW: 2 } })
|
||||
receiver.load_yaml(locale_default)
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user