To check out this repository please hg clone the following URL, or open the URL using EasyMercurial or your preferred Mercurial client.
root / .svn / pristine / 09 / 09d005add00d07aeb449a6c04ad00db8e1f72fbd.svn-base @ 1298:4f746d8966dd
History | View | Annotate | Download (2.59 KB)
| 1 | 1295:622f24f53b42 | Chris | # Redmine - project management software |
|---|---|---|---|
| 2 | # Copyright (C) 2006-2013 Jean-Philippe Lang |
||
| 3 | # |
||
| 4 | # This program is free software; you can redistribute it and/or |
||
| 5 | # modify it under the terms of the GNU General Public License |
||
| 6 | # as published by the Free Software Foundation; either version 2 |
||
| 7 | # of the License, or (at your option) any later version. |
||
| 8 | # |
||
| 9 | # This program is distributed in the hope that it will be useful, |
||
| 10 | # but WITHOUT ANY WARRANTY; without even the implied warranty of |
||
| 11 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
||
| 12 | # GNU General Public License for more details. |
||
| 13 | # |
||
| 14 | # You should have received a copy of the GNU General Public License |
||
| 15 | # along with this program; if not, write to the Free Software |
||
| 16 | # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. |
||
| 17 | |||
| 18 | require File.expand_path('../../../test_helper', __FILE__)
|
||
| 19 | |||
| 20 | class RoutingMyTest < ActionController::IntegrationTest |
||
| 21 | def test_my |
||
| 22 | ["get", "post"].each do |method| |
||
| 23 | assert_routing( |
||
| 24 | { :method => method, :path => "/my/account" },
|
||
| 25 | { :controller => 'my', :action => 'account' }
|
||
| 26 | ) |
||
| 27 | end |
||
| 28 | ["get", "post"].each do |method| |
||
| 29 | assert_routing( |
||
| 30 | { :method => method, :path => "/my/account/destroy" },
|
||
| 31 | { :controller => 'my', :action => 'destroy' }
|
||
| 32 | ) |
||
| 33 | end |
||
| 34 | assert_routing( |
||
| 35 | { :method => 'get', :path => "/my/page" },
|
||
| 36 | { :controller => 'my', :action => 'page' }
|
||
| 37 | ) |
||
| 38 | assert_routing( |
||
| 39 | { :method => 'get', :path => "/my" },
|
||
| 40 | { :controller => 'my', :action => 'index' }
|
||
| 41 | ) |
||
| 42 | assert_routing( |
||
| 43 | { :method => 'post', :path => "/my/reset_rss_key" },
|
||
| 44 | { :controller => 'my', :action => 'reset_rss_key' }
|
||
| 45 | ) |
||
| 46 | assert_routing( |
||
| 47 | { :method => 'post', :path => "/my/reset_api_key" },
|
||
| 48 | { :controller => 'my', :action => 'reset_api_key' }
|
||
| 49 | ) |
||
| 50 | ["get", "post"].each do |method| |
||
| 51 | assert_routing( |
||
| 52 | { :method => method, :path => "/my/password" },
|
||
| 53 | { :controller => 'my', :action => 'password' }
|
||
| 54 | ) |
||
| 55 | end |
||
| 56 | assert_routing( |
||
| 57 | { :method => 'get', :path => "/my/page_layout" },
|
||
| 58 | { :controller => 'my', :action => 'page_layout' }
|
||
| 59 | ) |
||
| 60 | assert_routing( |
||
| 61 | { :method => 'post', :path => "/my/add_block" },
|
||
| 62 | { :controller => 'my', :action => 'add_block' }
|
||
| 63 | ) |
||
| 64 | assert_routing( |
||
| 65 | { :method => 'post', :path => "/my/remove_block" },
|
||
| 66 | { :controller => 'my', :action => 'remove_block' }
|
||
| 67 | ) |
||
| 68 | assert_routing( |
||
| 69 | { :method => 'post', :path => "/my/order_blocks" },
|
||
| 70 | { :controller => 'my', :action => 'order_blocks' }
|
||
| 71 | ) |
||
| 72 | end |
||
| 73 | end |