Wrap params coverage nits (#2681)
* Add missing assert_response to signup API test * Add JSON response format to joins#create
This commit is contained in:
@@ -8,7 +8,11 @@ class Users::JoinsController < ApplicationController
|
||||
|
||||
def create
|
||||
Current.user.update!(user_params)
|
||||
redirect_to landing_path
|
||||
|
||||
respond_to do |format|
|
||||
format.html { redirect_to landing_path }
|
||||
format.json { head :no_content }
|
||||
end
|
||||
end
|
||||
|
||||
private
|
||||
|
||||
@@ -221,6 +221,8 @@ class FlatJsonParamsTest < ActionDispatch::IntegrationTest
|
||||
post signup_path, params: { email_address: email }, as: :json
|
||||
end
|
||||
end
|
||||
|
||||
assert_response :created
|
||||
end
|
||||
|
||||
test "complete signup with flat JSON" do
|
||||
@@ -242,6 +244,7 @@ class FlatJsonParamsTest < ActionDispatch::IntegrationTest
|
||||
|
||||
post users_joins_path, params: { name: "Flat Join" }, as: :json
|
||||
|
||||
assert_response :no_content
|
||||
assert_equal "Flat Join", users(:david).reload.name
|
||||
end
|
||||
|
||||
|
||||
Reference in New Issue
Block a user