mirror of
https://github.com/discourse/discourse.git
synced 2025-02-25 18:55:32 -06:00
No need for special helper to reset SiteSetting state.
* SiteSetting in tests uses a local provider that resets it.
This commit is contained in:
@@ -1,20 +1,6 @@
|
||||
module Helpers
|
||||
extend ActiveSupport::Concern
|
||||
|
||||
class_methods do
|
||||
def site_setting(setting_name, value)
|
||||
original_value = SiteSetting.public_send(setting_name.to_sym)
|
||||
|
||||
self.before do
|
||||
SiteSetting.public_send("#{setting_name}=", value)
|
||||
end
|
||||
|
||||
self.after do
|
||||
SiteSetting.public_send("#{setting_name}=", original_value)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
def self.next_seq
|
||||
@next_seq = (@next_seq || 0) + 1
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user