Fixup make_friend and remove_friend properly
Requests using POST are now actioned immediately, while requests using GET present a confirmation page.
This commit is contained in:
parent
a8396f8871
commit
573991e5a9
8 changed files with 73 additions and 39 deletions
|
@ -139,10 +139,18 @@ class UserControllerTest < ActionController::TestCase
|
|||
{ :controller => "user", :action => "account", :display_name => "username" }
|
||||
)
|
||||
|
||||
assert_routing(
|
||||
{ :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" }
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue