PERF: move 3 more option columns out of the user table

This commit is contained in:
Sam
2016-02-18 16:57:22 +11:00
parent f9c5cded6f
commit f0e942f647
22 changed files with 278 additions and 250 deletions

View File

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