2
0
Fork 0
mirror of https://github.com/discourse/discourse.git synced 2025-09-06 09:10:25 +08:00

PERF: optimise original query instead of huge rewrite

better perf for all cases
This commit is contained in:
Sam 2015-07-21 21:53:54 +10:00
parent 4491813d22
commit 3b61b098ab
2 changed files with 28 additions and 60 deletions

View file

@ -36,8 +36,7 @@ describe TopicTrackingState do
TopicUser.create!(user_id: user.id, topic_id: post.topic_id, last_read_post_number: 1, notification_level: 3)
report = TopicTrackingState.report(user.id)
# no read state for muted categories, query is faster
expect(report.length).to eq(0)
expect(report.length).to eq(1)
end
it "correctly gets the tracking state" do