]> git.openstreetmap.org Git - rails.git/blob - test/system/user_signup_test.rb
Merge remote-tracking branch 'upstream/pull/3911'
[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     fill_in "Email", :with => user.email
18     fill_in "Email Confirmation", :with => user.email
19     fill_in "Display Name", :with => user.display_name
20     fill_in "Password", :with => "testtest"
21     fill_in "Confirm Password", :with => "testtest"
22     click_button "Sign Up"
23
24     assert_content "Contributor terms"
25     click_on "Cancel"
26
27     assert_current_path "https://wiki.openstreetmap.org/wiki/Contributor_Terms_Declined"
28   end
29 end