tests: add missing controller tests.

This commit is contained in:
evazion
2020-03-30 12:36:06 -05:00
parent 83c2abf1ae
commit 4e2fd82ef6
19 changed files with 227 additions and 14 deletions

View File

@@ -4,10 +4,7 @@ module Explore
class PostsControllerTest < ActionDispatch::IntegrationTest
context "in all cases" do
setup do
@user = create(:user)
as_user do
create(:post)
end
@post = create(:post)
end
context "#popular" do
@@ -17,6 +14,15 @@ module Explore
end
end
context "#curated" do
should "render" do
@builder = create(:builder_user)
@post.add_favorite!(@builder)
get curated_explore_posts_path
assert_response :success
end
end
context "#searches" do
should "render" do
get searches_explore_posts_path