]> git.openstreetmap.org Git - rails.git/blob - test/system/user_signup_test.rb
Merge remote-tracking branch 'upstream/pull/4272'
[rails.git] / test / system / user_signup_test.rb
1 require "application_system_test_case"
2
3 class UserSignupTest < ApplicationSystemTestCase
4   test "Sign up from login page" do
5     visit login_path
6
7     click_on "Register now"
8
9     assert_content "Confirm Password"
10   end
11
12   test "externally redirect when contributor terms declined" do
13     user = build(:user)
14
15     visit root_path
16     click_on "Sign Up"
17
18     within ".new_user" do
19       fill_in "Email", :with => user.email
20       fill_in "Email Confirmation", :with => user.email
21       fill_in "Display Name", :with => user.display_name
22       fill_in "Password", :with => "testtest"
23       fill_in "Confirm Password", :with => "testtest"
24       click_on "Sign Up"
25     end
26
27     assert_content "Contributor terms"
28     click_on "Cancel"
29
30     assert_current_path "https://wiki.openstreetmap.org/wiki/Contributor_Terms_Declined"
31   end
32 end