posts: move fast_count to PostQueryBuilder.

This commit is contained in:
evazion
2020-05-06 14:47:16 -05:00
parent d3bd0a9cb5
commit a753ebbea9
9 changed files with 206 additions and 234 deletions

View File

@@ -9,7 +9,7 @@ class CountsControllerTest < ActionDispatch::IntegrationTest
end
should "render an error during a timeout" do
Post.stubs(:fast_count).raises(Post::TimeoutError.new)
PostQueryBuilder.any_instance.stubs(:fast_count).raises(Post::TimeoutError.new)
get posts_counts_path
assert_response :error
end