]> git.openstreetmap.org Git - rails.git/blobdiff - test/functional/user_controller_test.rb
Fixup make_friend and remove_friend properly
[rails.git] / test / functional / user_controller_test.rb
index 24daa1a6c708a718f8240d276aad3dc607e30687..fbceb3c0568b5cff127499f17eb6c0afdb84f8df 100644 (file)
@@ -143,10 +143,18 @@ class UserControllerTest < ActionController::TestCase
       { :path => "/user/username/make_friend", :method => :get },
       { :controller => "user", :action => "make_friend", :display_name => "username" }
     )
+    assert_routing(
+      { :path => "/user/username/make_friend", :method => :post },
+      { :controller => "user", :action => "make_friend", :display_name => "username" }
+    )
     assert_routing(
       { :path => "/user/username/remove_friend", :method => :get },
       { :controller => "user", :action => "remove_friend", :display_name => "username" }
     )
+    assert_routing(
+      { :path => "/user/username/remove_friend", :method => :post },
+      { :controller => "user", :action => "remove_friend", :display_name => "username" }
+    )
 
     assert_routing(
       { :path => "/user/username/set_status", :method => :get },
@@ -212,7 +220,7 @@ class UserControllerTest < ActionController::TestCase
     register_email = ActionMailer::Base.deliveries.first
   
     assert_equal register_email.to[0], new_email
-    assert_match /#{@url}/, register_email.body
+    assert_match /#{@url}/, register_email.body.to_s
 
     # Check the page
     assert_redirected_to :action => 'login', :referer => nil
@@ -367,7 +375,7 @@ class UserControllerTest < ActionController::TestCase
     assert_template :account
     assert_select "div#errorExplanation", false
     assert_select "div#notice", /^User information updated successfully/
-    assert_select "table#accountForm > tr > td > textarea#user_description", user.description
+    assert_select "table#accountForm > tr > td > div#user_description_container > div#user_description_content > textarea#user_description", user.description
 
     # Changing name to one that exists should fail
     user.display_name = users(:public_user).display_name