throw error on counts/posts endpoint during a timeout (#2170)
This commit is contained in:
@@ -7,6 +7,12 @@ class CountsControllerTest < ActionDispatch::IntegrationTest
|
||||
get posts_counts_path
|
||||
assert_response :success
|
||||
end
|
||||
|
||||
should "render an error during a timeout" do
|
||||
Post.stubs(:fast_count).raises(Post::TimeoutError.new)
|
||||
get posts_counts_path
|
||||
assert_response :error
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user