-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Attempts to reduce spam registrations
* Don't display website until user has signed in 10 times * Don't display unverified users in index * Honeypot field
- Loading branch information
Showing
7 changed files
with
58 additions
and
13 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -68,6 +68,21 @@ class RegistrationsControllerTest < ActionController::TestCase | |
assert assigns(:user).errors[:base].first.include?('processing') | ||
end | ||
|
||
test 'should not register user if website given' do | ||
assert_no_difference('User.count') do | ||
post :create, params: { | ||
user: { | ||
username: 'mileyfan1997', | ||
email: '[email protected]', | ||
password: '12345678', | ||
password_confirmation: '12345678', | ||
processing_consent: '1', | ||
website: 'https://myhomepage.com' | ||
} | ||
} | ||
end | ||
end | ||
|
||
test 'should redirect to user page after changing password' do | ||
user = users(:regular_user) | ||
sign_in user | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters