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