We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 8389618 commit 76aa680Copy full SHA for 76aa680
spec/requests/better_together/users/registrations_spec.rb
@@ -87,9 +87,10 @@
87
privacy_policy_agreement: '1',
88
code_of_conduct_agreement: '1'
89
}
90
- end.to change(BetterTogether::User, :count).by(1) # User created despite empty name
+ end.not_to change(BetterTogether::User, :count) # User not created due to invalid person
91
92
- expect(response).to have_http_status(:ok) # Form re-rendered with errors
+ expect(response).to have_http_status(:unprocessable_content) # Validation failed
93
+ expect(response.body).to include('can't be blank') # Name validation error shown
94
end
95
96
0 commit comments