mirror of
https://github.com/discourse/discourse.git
synced 2025-05-23 06:51:27 +08:00
Log site setting changes and show in admin
This commit is contained in:
@ -38,6 +38,13 @@ describe Admin::SiteSettingsController do
|
||||
SiteSetting.expects(:'test_setting=').with('').once
|
||||
xhr :put, :update, id: 'test_setting', value: ''
|
||||
end
|
||||
|
||||
it 'logs the change' do
|
||||
SiteSetting.stubs(:test_setting).returns('previous')
|
||||
SiteSetting.expects(:'test_setting=').with('hello').once
|
||||
StaffActionLogger.any_instance.expects(:log_site_setting_change).with('test_setting', 'previous', 'hello')
|
||||
xhr :put, :update, id: 'test_setting', value: 'hello'
|
||||
end
|
||||
end
|
||||
|
||||
end
|
||||
|
Reference in New Issue
Block a user