Hack in registration prevention (#37)
All checks were successful
Deploy / deploy (push) Successful in 4m1s
All checks were successful
Deploy / deploy (push) Successful in 4m1s
Reviewed-on: #37
This commit is contained in:
parent
eaa1846d42
commit
543a9599e0
4 changed files with 32 additions and 14 deletions
|
@ -17,15 +17,17 @@ class UsersControllerTest < ActionDispatch::IntegrationTest
|
|||
end
|
||||
|
||||
test "should create user" do
|
||||
assert_difference("User.count") do
|
||||
params = {
|
||||
user: {
|
||||
email: "userthree@example.local",
|
||||
password: "secret",
|
||||
password_confirmation: "secret"
|
||||
stub_environment(REGISTRATION_ALLOWED: "true") do
|
||||
assert_difference("User.count") do
|
||||
params = {
|
||||
user: {
|
||||
email: "userthree@example.local",
|
||||
password: "secret",
|
||||
password_confirmation: "secret"
|
||||
}
|
||||
}
|
||||
}
|
||||
post users_url, params: params
|
||||
post users_url, params: params
|
||||
end
|
||||
end
|
||||
|
||||
assert_redirected_to user_url(User.last)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue