Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Test for spamaway #7276

Merged
merged 4 commits into from
Jan 17, 2020
Merged
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 20 additions & 0 deletions test/integration/signup_flow_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,26 @@ def setup
assert response.body.include? 'errors prohibited this user from being saved'
assert response.body.include? 'Email should look like an email address.'
end

test 'spamaway text area not blank error message'
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There should be an empty line between the tests.

Copy link
Contributor

@VladimirMikulic VladimirMikulic Jan 17, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

test 'something' do
    # Logic
end

post '/register', params: {
user: {
username: "newuser",
email: @new_user[:email],
password: @new_user[:password],
password_confirmation: @new_user[:password]
},
spamaway: {
statement1: @spamaway[:statement1],
statement2: @spamaway[:statement2],
statement3: @spamaway[:statement3],
statement4: @spamaway[:statement4],
follow_instructions: "Not_Blank"
}
}
assert response.body.include? '1 error prohibited this user from being saved'
assert response.body.include? 'Spam detection Please read the instructions in the last box carefully.'
end

private

Expand Down