From bdc87546683249a786f6ad7f2eb238de328473ab Mon Sep 17 00:00:00 2001 From: Suyash Choudhary <57896905+sssash18@users.noreply.github.com> Date: Fri, 17 Jan 2020 12:36:37 +0530 Subject: [PATCH 1/3] Added 'spamaway_textarea blank error' test --- test/integration/signup_flow_test.rb | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/test/integration/signup_flow_test.rb b/test/integration/signup_flow_test.rb index eaa97b9e3b..d0b4d86f18 100644 --- a/test/integration/signup_flow_test.rb +++ b/test/integration/signup_flow_test.rb @@ -80,6 +80,25 @@ 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' + 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 From cf7f6debf0cc4444482e158132db28e72de237e5 Mon Sep 17 00:00:00 2001 From: Suyash Choudhary <57896905+sssash18@users.noreply.github.com> Date: Fri, 17 Jan 2020 20:55:18 +0530 Subject: [PATCH 2/3] Added empty line between the test --- test/integration/signup_flow_test.rb | 1 + 1 file changed, 1 insertion(+) diff --git a/test/integration/signup_flow_test.rb b/test/integration/signup_flow_test.rb index d0b4d86f18..420748148c 100644 --- a/test/integration/signup_flow_test.rb +++ b/test/integration/signup_flow_test.rb @@ -80,6 +80,7 @@ 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' post '/register', params: { user: { From a2412e7ac179243a74cd636bad71941344d80778 Mon Sep 17 00:00:00 2001 From: Suyash Choudhary <57896905+sssash18@users.noreply.github.com> Date: Fri, 17 Jan 2020 21:45:48 +0530 Subject: [PATCH 3/3] Added 'do' --- test/integration/signup_flow_test.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/integration/signup_flow_test.rb b/test/integration/signup_flow_test.rb index 420748148c..deaad82f78 100644 --- a/test/integration/signup_flow_test.rb +++ b/test/integration/signup_flow_test.rb @@ -81,7 +81,7 @@ def setup assert response.body.include? 'Email should look like an email address.' end - test 'spamaway text area not blank error message' + test 'spamaway text area not blank error message' do post '/register', params: { user: { username: "newuser",