Skip to content

Commit 8386580

Browse files
committed
Use expect(response.body).to include('password_confirmation') to avoid errors caused by changes in responses on different Rails' versions
1 parent d5cfb86 commit 8386580

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

spec/requests/admin/users_controller/updated_ajax_spec.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@
5252
expect(response.body).to start_with(
5353
'ERROR: ActionController::ParameterMissing, param is missing or the value is empty'
5454
)
55-
expect(response.body.chomp).to end_with('password_confirmation')
55+
expect(response.body).to include('password_confirmation')
5656
expect(current_user.reload.authenticate('secret')).to be_truthy
5757
expect(current_user.reload.authenticate('new password')).to be_falsey
5858
end

0 commit comments

Comments
 (0)