posts: fix error on /posts?md5=<does_not_exist>.

This commit is contained in:
evazion
2019-08-13 21:30:21 -05:00
parent 0f98631908
commit dbfd6185f1
2 changed files with 6 additions and 1 deletions

View File

@@ -132,6 +132,11 @@ class PostsControllerTest < ActionDispatch::IntegrationTest
get posts_path, params: { md5: @post.md5 }
assert_redirected_to(@post)
end
should "return error on nonexistent md5" do
get posts_path(md5: "foo")
assert_response 404
end
end
context "with a random search" do