Log site setting changes and show in admin

This commit is contained in:
Neil Lalonde
2013-08-19 16:58:38 -04:00
parent 3cc8354fe2
commit 1d030666d8
12 changed files with 92 additions and 33 deletions

View File

@ -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