Reviewed-on: #355 Co-authored-by: miteruzo <miteruzo@naver.com> Co-committed-by: miteruzo <miteruzo@naver.com>
このコミットはPull リクエスト #355 でマージされました.
このコミットが含まれているのは:
@@ -90,12 +90,14 @@ RSpec.describe 'Users', type: :request do
|
||||
expect(response).to have_http_status(:unauthorized)
|
||||
end
|
||||
|
||||
it 'returns 400 when name is blank' do
|
||||
it 'returns 422 when name is blank' do
|
||||
put "/users/#{user.id}",
|
||||
params: { name: ' ' },
|
||||
headers: auth_headers(user)
|
||||
|
||||
expect(response).to have_http_status(:bad_request)
|
||||
expect(response).to have_http_status(:unprocessable_entity)
|
||||
expect(json.fetch('errors')).to include(
|
||||
'name' => ['名前は必須です.'])
|
||||
end
|
||||
|
||||
it 'updates name and returns user slice' do
|
||||
|
||||
新しい課題から参照
ユーザをブロックする