mirror of
https://github.com/discourse/discourse.git
synced 2025-05-23 08:51:05 +08:00
PERF: move 3 more option columns out of the user table
This commit is contained in:
@ -19,6 +19,8 @@ describe UserSerializer do
|
||||
it "serializes options correctly" do
|
||||
# so we serialize more stuff
|
||||
SiteSetting.edit_history_visible_to_public = false
|
||||
SiteSetting.default_other_auto_track_topics_after_msecs = 0
|
||||
SiteSetting.default_other_new_topic_duration_minutes = 60*24
|
||||
|
||||
user = Fabricate.build(:user,
|
||||
user_profile: Fabricate.build(:user_profile),
|
||||
@ -29,6 +31,8 @@ describe UserSerializer do
|
||||
json = UserSerializer.new(user, scope: Guardian.new(user), root: false).as_json
|
||||
|
||||
expect(json[:user_option][:edit_history_public]).to eq(true)
|
||||
expect(json[:user_option][:new_topic_duration_minutes]).to eq(60*24)
|
||||
expect(json[:user_option][:auto_track_topics_after_msecs]).to eq(0)
|
||||
|
||||
end
|
||||
end
|
||||
|
Reference in New Issue
Block a user