get "/user/:display_name/diary/rss" => "diary_entries#rss", :defaults => { :format => :rss }
get "/diary/:language/rss" => "diary_entries#rss", :defaults => { :format => :rss }
get "/diary/rss" => "diary_entries#rss", :defaults => { :format => :rss }
- get "/user/:display_name/diary/comments/:page" => "diary_entries#comments", :page => /[1-9][0-9]*/
- get "/user/:display_name/diary/comments/" => "diary_entries#comments", :as => :diary_comments
+ get "/user/:display_name/diary/comments/:page", :page => /[1-9][0-9]*/, :to => redirect(:path => "/user/%{display_name}/diary/comments")
+ get "/user/:display_name/diary/comments" => "diary_entries#comments", :as => :diary_comments
get "/user/:display_name/diary" => "diary_entries#index"
get "/diary/:language" => "diary_entries#index"
scope "/user/:display_name" do
{ :path => "/user/username/diary/comments", :method => :get },
{ :controller => "diary_entries", :action => "comments", :display_name => "username" }
)
- assert_routing(
- { :path => "/user/username/diary/comments/1", :method => :get },
- { :controller => "diary_entries", :action => "comments", :display_name => "username", :page => "1" }
- )
assert_routing(
{ :path => "/diary/new", :method => :get },
{ :path => "/user/username/diary/1/unsubscribe", :method => :post },
{ :controller => "diary_entries", :action => "unsubscribe", :display_name => "username", :id => "1" }
)
+
+ get "/user/username/diary/comments/1"
+ assert_redirected_to "/user/username/diary/comments"
end
def test_new_no_login