mirror of
https://github.com/discourse/discourse.git
synced 2024-11-23 07:52:19 +08:00
less stubbing for better clarity and robustness
This commit is contained in:
parent
7652901b75
commit
783bac9ff7
|
@ -120,9 +120,8 @@ describe StaffActionLogger do
|
|||
|
||||
describe "log_site_setting_change" do
|
||||
it "raises an error when params are invalid" do
|
||||
SiteSetting.stubs(:respond_to?).with('abc').returns(false)
|
||||
expect { logger.log_site_setting_change(nil, '1', '2') }.to raise_error(Discourse::InvalidParameters)
|
||||
expect { logger.log_site_setting_change('abc', '1', '2') }.to raise_error(Discourse::InvalidParameters)
|
||||
expect { logger.log_site_setting_change('i_am_a_site_setting_that_will_never_exist', '1', '2') }.to raise_error(Discourse::InvalidParameters)
|
||||
end
|
||||
|
||||
it "creates a new UserHistory record" do
|
||||
|
|
Loading…
Reference in New Issue
Block a user