tests: fix tests for /comments/new, /post_flags/new.
This commit is contained in:
@@ -30,6 +30,6 @@ class PostFlagsController < ApplicationController
|
|||||||
private
|
private
|
||||||
|
|
||||||
def post_flag_params
|
def post_flag_params
|
||||||
params.require(:post_flag).permit(%i[post_id reason])
|
params.fetch(:post_flag, {}).permit(%i[post_id reason])
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -118,7 +118,7 @@ class CommentsControllerTest < ActionDispatch::IntegrationTest
|
|||||||
context "new action" do
|
context "new action" do
|
||||||
should "redirect" do
|
should "redirect" do
|
||||||
get_auth new_comment_path, @user
|
get_auth new_comment_path, @user
|
||||||
assert_redirected_to comments_path
|
assert_response :success
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user