- assert_select "div#errorExplanation"
- assert_select "div#signupForm > fieldset > div.form-row > div.field_with_errors > input#user_display_name"
+ assert_select "form > fieldset > div.form-row > div.field_with_errors > input#user_display_name"
+ end
+
+ def test_user_terms_new_user
+ get :terms, {}, { "new_user" => User.new }
+ assert_response :success
+ assert_template :terms
+ end
+
+ def test_user_terms_seen
+ user = users(:normal_user)
+
+ # Set the username cookie
+ @request.cookies["_osm_username"] = user.display_name
+
+ get :terms, {}, { "user" => user }
+ assert_response :redirect
+ assert_redirected_to :action => :account, :display_name => user.display_name