From ed368fe47f87f59113a69f283b8fb45e8df678c1 Mon Sep 17 00:00:00 2001 From: shreyaa-sharmaa Date: Wed, 7 Oct 2020 02:44:48 +0530 Subject: [PATCH] Empty Spamaway test for new user --- test/system/signup_spamaway_test.rb | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 test/system/signup_spamaway_test.rb diff --git a/test/system/signup_spamaway_test.rb b/test/system/signup_spamaway_test.rb new file mode 100644 index 0000000000..bdc9cf1335 --- /dev/null +++ b/test/system/signup_spamaway_test.rb @@ -0,0 +1,22 @@ +require "application_system_test_case" + +class SignupFormTest < ApplicationSystemTestCase + def setup + visit "/" + end + + test "the user is not registered without passing spam " do + visit "/signup" + + assert_difference 'User.count', 0 do + #Creating a user and leaving the spamaway check empty + fill_in("username-signup", with: "abc") + fill_in("email", with: "abc@publiclab.org") + fill_in("password1", with: "secretive") + fill_in("password-confirmation", with: "secretive") + + find("#create-form #signup-button").click() + end + + end +end \ No newline at end of file