1 require File.dirname(__FILE__) + '/../test_helper'
2 require 'message_controller'
4 class MessageControllerTest < ActionController::TestCase
6 # test all routes which lead to this controller
9 { :path => "/user/username/inbox", :method => :get },
10 { :controller => "message", :action => "inbox", :display_name => "username" }
13 { :path => "/user/username/outbox", :method => :get },
14 { :controller => "message", :action => "outbox", :display_name => "username" }
17 { :path => "/message/new/username", :method => :get },
18 { :controller => "message", :action => "new", :display_name => "username" }
21 { :path => "/message/new/username", :method => :post },
22 { :controller => "message", :action => "new", :display_name => "username" }
25 { :path => "/message/read/1", :method => :get },
26 { :controller => "message", :action => "read", :message_id => "1" }
29 { :path => "/message/mark/1", :method => :post },
30 { :controller => "message", :action => "mark", :message_id => "1" }
33 { :path => "/message/reply/1", :method => :get },
34 { :controller => "message", :action => "reply", :message_id => "1" }
37 { :path => "/message/reply/1", :method => :post },
38 { :controller => "message", :action => "reply", :message_id => "1" }
41 { :path => "/message/delete/1", :method => :post },
42 { :controller => "message", :action => "delete", :message_id => "1" }