Skip to content

Commit

Permalink
Test for spamaway (publiclab#7276)
Browse files Browse the repository at this point in the history
* Added 'spamaway_textarea blank error' test

* Added empty line between the test

* Added 'do'
  • Loading branch information
sssash18 authored and NitinBhasneia committed Feb 5, 2020
1 parent 3466be4 commit 30fcb93
Showing 1 changed file with 20 additions and 0 deletions.
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' do
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

0 comments on commit 30fcb93

Please sign in to comment.