Redmine 3.4.4
This commit is contained in:
commit
64924a6376
2112 changed files with 259028 additions and 0 deletions
36
test/integration/routing/account_test.rb
Normal file
36
test/integration/routing/account_test.rb
Normal file
|
@ -0,0 +1,36 @@
|
|||
# Redmine - project management software
|
||||
# Copyright (C) 2006-2017 Jean-Philippe Lang
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or
|
||||
# modify it under the terms of the GNU General Public License
|
||||
# as published by the Free Software Foundation; either version 2
|
||||
# of the License, or (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program; if not, write to the Free Software
|
||||
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||
|
||||
require File.expand_path('../../../test_helper', __FILE__)
|
||||
|
||||
class RoutingAccountTest < Redmine::RoutingTest
|
||||
def test_account
|
||||
should_route 'GET /login' => 'account#login'
|
||||
should_route 'POST /login' => 'account#login'
|
||||
|
||||
should_route 'GET /logout' => 'account#logout'
|
||||
should_route 'POST /logout' => 'account#logout'
|
||||
|
||||
should_route 'GET /account/register' => 'account#register'
|
||||
should_route 'POST /account/register' => 'account#register'
|
||||
|
||||
should_route 'GET /account/lost_password' => 'account#lost_password'
|
||||
should_route 'POST /account/lost_password' => 'account#lost_password'
|
||||
|
||||
should_route 'GET /account/activate' => 'account#activate'
|
||||
end
|
||||
end
|
31
test/integration/routing/activities_test.rb
Normal file
31
test/integration/routing/activities_test.rb
Normal file
|
@ -0,0 +1,31 @@
|
|||
# Redmine - project management software
|
||||
# Copyright (C) 2006-2017 Jean-Philippe Lang
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or
|
||||
# modify it under the terms of the GNU General Public License
|
||||
# as published by the Free Software Foundation; either version 2
|
||||
# of the License, or (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program; if not, write to the Free Software
|
||||
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||
|
||||
require File.expand_path('../../../test_helper', __FILE__)
|
||||
|
||||
class RoutingActivitiesTest < Redmine::RoutingTest
|
||||
|
||||
def test_activity
|
||||
should_route 'GET /activity' => 'activities#index'
|
||||
should_route 'GET /activity.atom' => 'activities#index', :format => 'atom'
|
||||
end
|
||||
|
||||
def test_project_activity
|
||||
should_route 'GET /projects/33/activity' => 'activities#index', :id => '33'
|
||||
should_route 'GET /projects/33/activity.atom' => 'activities#index', :id => '33', :format => 'atom'
|
||||
end
|
||||
end
|
29
test/integration/routing/admin_test.rb
Normal file
29
test/integration/routing/admin_test.rb
Normal file
|
@ -0,0 +1,29 @@
|
|||
# Redmine - project management software
|
||||
# Copyright (C) 2006-2017 Jean-Philippe Lang
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or
|
||||
# modify it under the terms of the GNU General Public License
|
||||
# as published by the Free Software Foundation; either version 2
|
||||
# of the License, or (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program; if not, write to the Free Software
|
||||
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||
|
||||
require File.expand_path('../../../test_helper', __FILE__)
|
||||
|
||||
class RoutingAdminTest < Redmine::RoutingTest
|
||||
def test_administration_panel
|
||||
should_route 'GET /admin' => 'admin#index'
|
||||
should_route 'GET /admin/projects' => 'admin#projects'
|
||||
should_route 'GET /admin/plugins' => 'admin#plugins'
|
||||
should_route 'GET /admin/info' => 'admin#info'
|
||||
should_route 'POST /admin/test_email' => 'admin#test_email'
|
||||
should_route 'POST /admin/default_configuration' => 'admin#default_configuration'
|
||||
end
|
||||
end
|
36
test/integration/routing/attachments_test.rb
Normal file
36
test/integration/routing/attachments_test.rb
Normal file
|
@ -0,0 +1,36 @@
|
|||
# Redmine - project management software
|
||||
# Copyright (C) 2006-2017 Jean-Philippe Lang
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or
|
||||
# modify it under the terms of the GNU General Public License
|
||||
# as published by the Free Software Foundation; either version 2
|
||||
# of the License, or (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program; if not, write to the Free Software
|
||||
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||
|
||||
require File.expand_path('../../../test_helper', __FILE__)
|
||||
|
||||
class RoutingAttachmentsTest < Redmine::RoutingTest
|
||||
def test_attachments
|
||||
should_route 'GET /attachments/1' => 'attachments#show', :id => '1'
|
||||
should_route 'GET /attachments/1/filename.ext' => 'attachments#show', :id => '1', :filename => 'filename.ext'
|
||||
|
||||
should_route 'GET /attachments/download/1' => 'attachments#download', :id => '1'
|
||||
should_route 'GET /attachments/download/1/filename.ext' => 'attachments#download', :id => '1', :filename => 'filename.ext'
|
||||
|
||||
should_route 'GET /attachments/thumbnail/1' => 'attachments#thumbnail', :id => '1'
|
||||
should_route 'GET /attachments/thumbnail/1/200' => 'attachments#thumbnail', :id => '1', :size => '200'
|
||||
|
||||
should_route 'DELETE /attachments/1' => 'attachments#destroy', :id => '1'
|
||||
|
||||
should_route 'GET /attachments/issues/1/edit' => 'attachments#edit_all', :object_type => 'issues', :object_id => '1'
|
||||
should_route 'PATCH /attachments/issues/1' => 'attachments#update_all', :object_type => 'issues', :object_id => '1'
|
||||
end
|
||||
end
|
32
test/integration/routing/auth_sources_test.rb
Normal file
32
test/integration/routing/auth_sources_test.rb
Normal file
|
@ -0,0 +1,32 @@
|
|||
# Redmine - project management software
|
||||
# Copyright (C) 2006-2017 Jean-Philippe Lang
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or
|
||||
# modify it under the terms of the GNU General Public License
|
||||
# as published by the Free Software Foundation; either version 2
|
||||
# of the License, or (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program; if not, write to the Free Software
|
||||
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||
|
||||
require File.expand_path('../../../test_helper', __FILE__)
|
||||
|
||||
class RoutingAuthSourcesTest < Redmine::RoutingTest
|
||||
def test_auth_sources
|
||||
should_route 'GET /auth_sources' => 'auth_sources#index'
|
||||
should_route 'GET /auth_sources/new' => 'auth_sources#new'
|
||||
should_route 'POST /auth_sources' => 'auth_sources#create'
|
||||
should_route 'GET /auth_sources/autocomplete_for_new_user' => 'auth_sources#autocomplete_for_new_user'
|
||||
|
||||
should_route 'GET /auth_sources/1234/edit' => 'auth_sources#edit', :id => '1234'
|
||||
should_route 'PUT /auth_sources/1234' => 'auth_sources#update', :id => '1234'
|
||||
should_route 'DELETE /auth_sources/1234' => 'auth_sources#destroy', :id => '1234'
|
||||
should_route 'GET /auth_sources/1234/test_connection' => 'auth_sources#test_connection', :id => '1234'
|
||||
end
|
||||
end
|
24
test/integration/routing/auto_completes_test.rb
Normal file
24
test/integration/routing/auto_completes_test.rb
Normal file
|
@ -0,0 +1,24 @@
|
|||
# Redmine - project management software
|
||||
# Copyright (C) 2006-2017 Jean-Philippe Lang
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or
|
||||
# modify it under the terms of the GNU General Public License
|
||||
# as published by the Free Software Foundation; either version 2
|
||||
# of the License, or (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program; if not, write to the Free Software
|
||||
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||
|
||||
require File.expand_path('../../../test_helper', __FILE__)
|
||||
|
||||
class RoutingAutoCompletesTest < Redmine::RoutingTest
|
||||
def test_auto_completes
|
||||
should_route 'GET /issues/auto_complete' => 'auto_completes#issues'
|
||||
end
|
||||
end
|
32
test/integration/routing/boards_test.rb
Normal file
32
test/integration/routing/boards_test.rb
Normal file
|
@ -0,0 +1,32 @@
|
|||
# Redmine - project management software
|
||||
# Copyright (C) 2006-2017 Jean-Philippe Lang
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or
|
||||
# modify it under the terms of the GNU General Public License
|
||||
# as published by the Free Software Foundation; either version 2
|
||||
# of the License, or (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program; if not, write to the Free Software
|
||||
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||
|
||||
require File.expand_path('../../../test_helper', __FILE__)
|
||||
|
||||
class RoutingBoardsTest < Redmine::RoutingTest
|
||||
def test_boards
|
||||
should_route 'GET /projects/foo/boards' => 'boards#index', :project_id => 'foo'
|
||||
should_route 'GET /projects/foo/boards/new' => 'boards#new', :project_id => 'foo'
|
||||
should_route 'POST /projects/foo/boards' => 'boards#create', :project_id => 'foo'
|
||||
|
||||
should_route 'GET /projects/foo/boards/44' => 'boards#show', :project_id => 'foo', :id => '44'
|
||||
should_route 'GET /projects/foo/boards/44.atom' => 'boards#show', :project_id => 'foo', :id => '44', :format => 'atom'
|
||||
should_route 'GET /projects/foo/boards/44/edit' => 'boards#edit', :project_id => 'foo', :id => '44'
|
||||
should_route 'PUT /projects/foo/boards/44' => 'boards#update', :project_id => 'foo', :id => '44'
|
||||
should_route 'DELETE /projects/foo/boards/44' => 'boards#destroy', :project_id => 'foo', :id => '44'
|
||||
end
|
||||
end
|
25
test/integration/routing/calendars_test.rb
Normal file
25
test/integration/routing/calendars_test.rb
Normal file
|
@ -0,0 +1,25 @@
|
|||
# Redmine - project management software
|
||||
# Copyright (C) 2006-2017 Jean-Philippe Lang
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or
|
||||
# modify it under the terms of the GNU General Public License
|
||||
# as published by the Free Software Foundation; either version 2
|
||||
# of the License, or (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program; if not, write to the Free Software
|
||||
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||
|
||||
require File.expand_path('../../../test_helper', __FILE__)
|
||||
|
||||
class RoutingCalendarsTest < Redmine::RoutingTest
|
||||
def test_calendars
|
||||
should_route 'GET /issues/calendar' => 'calendars#show'
|
||||
should_route 'GET /projects/foo/issues/calendar' => 'calendars#show', :project_id => 'foo'
|
||||
end
|
||||
end
|
25
test/integration/routing/comments_test.rb
Normal file
25
test/integration/routing/comments_test.rb
Normal file
|
@ -0,0 +1,25 @@
|
|||
# Redmine - project management software
|
||||
# Copyright (C) 2006-2017 Jean-Philippe Lang
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or
|
||||
# modify it under the terms of the GNU General Public License
|
||||
# as published by the Free Software Foundation; either version 2
|
||||
# of the License, or (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program; if not, write to the Free Software
|
||||
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||
|
||||
require File.expand_path('../../../test_helper', __FILE__)
|
||||
|
||||
class RoutingCommentsTest < Redmine::RoutingTest
|
||||
def test_comments
|
||||
should_route 'POST /news/567/comments' => 'comments#create', :id => '567'
|
||||
should_route 'DELETE /news/567/comments/15' => 'comments#destroy', :id => '567', :comment_id => '15'
|
||||
end
|
||||
end
|
30
test/integration/routing/context_menus_test.rb
Normal file
30
test/integration/routing/context_menus_test.rb
Normal file
|
@ -0,0 +1,30 @@
|
|||
# Redmine - project management software
|
||||
# Copyright (C) 2006-2017 Jean-Philippe Lang
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or
|
||||
# modify it under the terms of the GNU General Public License
|
||||
# as published by the Free Software Foundation; either version 2
|
||||
# of the License, or (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program; if not, write to the Free Software
|
||||
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||
|
||||
require File.expand_path('../../../test_helper', __FILE__)
|
||||
|
||||
class RoutingContextMenusTest < Redmine::RoutingTest
|
||||
def test_context_menus_time_entries
|
||||
should_route 'GET /time_entries/context_menu' => 'context_menus#time_entries'
|
||||
should_route 'POST /time_entries/context_menu' => 'context_menus#time_entries'
|
||||
end
|
||||
|
||||
def test_context_menus_issues
|
||||
should_route 'GET /issues/context_menu' => 'context_menus#issues'
|
||||
should_route 'POST /issues/context_menu' => 'context_menus#issues'
|
||||
end
|
||||
end
|
37
test/integration/routing/custom_fields_test.rb
Normal file
37
test/integration/routing/custom_fields_test.rb
Normal file
|
@ -0,0 +1,37 @@
|
|||
# Redmine - project management software
|
||||
# Copyright (C) 2006-2017 Jean-Philippe Lang
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or
|
||||
# modify it under the terms of the GNU General Public License
|
||||
# as published by the Free Software Foundation; either version 2
|
||||
# of the License, or (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program; if not, write to the Free Software
|
||||
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||
|
||||
require File.expand_path('../../../test_helper', __FILE__)
|
||||
|
||||
class RoutingCustomFieldsTest < Redmine::RoutingTest
|
||||
def test_custom_fields
|
||||
should_route 'GET /custom_fields' => 'custom_fields#index'
|
||||
should_route 'GET /custom_fields/new' => 'custom_fields#new'
|
||||
should_route 'POST /custom_fields' => 'custom_fields#create'
|
||||
|
||||
should_route 'GET /custom_fields/2/edit' => 'custom_fields#edit', :id => '2'
|
||||
should_route 'PUT /custom_fields/2' => 'custom_fields#update', :id => '2'
|
||||
should_route 'DELETE /custom_fields/2' => 'custom_fields#destroy', :id => '2'
|
||||
end
|
||||
|
||||
def test_custom_field_enumerations
|
||||
should_route 'GET /custom_fields/3/enumerations' => 'custom_field_enumerations#index', :custom_field_id => '3'
|
||||
should_route 'POST /custom_fields/3/enumerations' => 'custom_field_enumerations#create', :custom_field_id => '3'
|
||||
should_route 'PUT /custom_fields/3/enumerations' => 'custom_field_enumerations#update_each', :custom_field_id => '3'
|
||||
should_route 'DELETE /custom_fields/3/enumerations/6' => 'custom_field_enumerations#destroy', :custom_field_id => '3', :id => '6'
|
||||
end
|
||||
end
|
37
test/integration/routing/documents_test.rb
Normal file
37
test/integration/routing/documents_test.rb
Normal file
|
@ -0,0 +1,37 @@
|
|||
# Redmine - project management software
|
||||
# Copyright (C) 2006-2017 Jean-Philippe Lang
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or
|
||||
# modify it under the terms of the GNU General Public License
|
||||
# as published by the Free Software Foundation; either version 2
|
||||
# of the License, or (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program; if not, write to the Free Software
|
||||
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||
|
||||
require File.expand_path('../../../test_helper', __FILE__)
|
||||
|
||||
class RoutingDocumentsTest < Redmine::RoutingTest
|
||||
def test_documents_scoped_under_project
|
||||
should_route 'GET /projects/567/documents' => 'documents#index', :project_id => '567'
|
||||
should_route 'GET /projects/567/documents/new' => 'documents#new', :project_id => '567'
|
||||
should_route 'POST /projects/567/documents' => 'documents#create', :project_id => '567'
|
||||
end
|
||||
|
||||
def test_documents
|
||||
should_route 'GET /documents/22' => 'documents#show', :id => '22'
|
||||
should_route 'GET /documents/22/edit' => 'documents#edit', :id => '22'
|
||||
should_route 'PUT /documents/22' => 'documents#update', :id => '22'
|
||||
should_route 'DELETE /documents/22' => 'documents#destroy', :id => '22'
|
||||
end
|
||||
|
||||
def test_document_attachments
|
||||
should_route 'POST /documents/22/add_attachment' => 'documents#add_attachment', :id => '22'
|
||||
end
|
||||
end
|
30
test/integration/routing/enumerations_test.rb
Normal file
30
test/integration/routing/enumerations_test.rb
Normal file
|
@ -0,0 +1,30 @@
|
|||
# Redmine - project management software
|
||||
# Copyright (C) 2006-2017 Jean-Philippe Lang
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or
|
||||
# modify it under the terms of the GNU General Public License
|
||||
# as published by the Free Software Foundation; either version 2
|
||||
# of the License, or (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program; if not, write to the Free Software
|
||||
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||
|
||||
require File.expand_path('../../../test_helper', __FILE__)
|
||||
|
||||
class RoutingEnumerationsTest < Redmine::RoutingTest
|
||||
def test_enumerations
|
||||
should_route 'GET /enumerations' => 'enumerations#index'
|
||||
should_route 'GET /enumerations/new' => 'enumerations#new'
|
||||
should_route 'POST /enumerations' => 'enumerations#create'
|
||||
|
||||
should_route 'GET /enumerations/2/edit' => 'enumerations#edit', :id => '2'
|
||||
should_route 'PUT /enumerations/2' => 'enumerations#update', :id => '2'
|
||||
should_route 'DELETE /enumerations/2' => 'enumerations#destroy', :id => '2'
|
||||
end
|
||||
end
|
26
test/integration/routing/files_test.rb
Normal file
26
test/integration/routing/files_test.rb
Normal file
|
@ -0,0 +1,26 @@
|
|||
# Redmine - project management software
|
||||
# Copyright (C) 2006-2017 Jean-Philippe Lang
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or
|
||||
# modify it under the terms of the GNU General Public License
|
||||
# as published by the Free Software Foundation; either version 2
|
||||
# of the License, or (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program; if not, write to the Free Software
|
||||
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||
|
||||
require File.expand_path('../../../test_helper', __FILE__)
|
||||
|
||||
class RoutingFilesTest < Redmine::RoutingTest
|
||||
def test_files
|
||||
should_route 'GET /projects/foo/files' => 'files#index', :project_id => 'foo'
|
||||
should_route 'GET /projects/foo/files/new' => 'files#new', :project_id => 'foo'
|
||||
should_route 'POST /projects/foo/files' => 'files#create', :project_id => 'foo'
|
||||
end
|
||||
end
|
28
test/integration/routing/gantts_test.rb
Normal file
28
test/integration/routing/gantts_test.rb
Normal file
|
@ -0,0 +1,28 @@
|
|||
# Redmine - project management software
|
||||
# Copyright (C) 2006-2017 Jean-Philippe Lang
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or
|
||||
# modify it under the terms of the GNU General Public License
|
||||
# as published by the Free Software Foundation; either version 2
|
||||
# of the License, or (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program; if not, write to the Free Software
|
||||
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||
|
||||
require File.expand_path('../../../test_helper', __FILE__)
|
||||
|
||||
class RoutingGanttsTest < Redmine::RoutingTest
|
||||
def test_gantts
|
||||
should_route 'GET /issues/gantt' => 'gantts#show'
|
||||
should_route 'GET /issues/gantt.pdf' => 'gantts#show', :format => 'pdf'
|
||||
|
||||
should_route 'GET /projects/foo/issues/gantt' => 'gantts#show', :project_id => 'foo'
|
||||
should_route 'GET /projects/foo/issues/gantt.pdf' => 'gantts#show', :project_id => 'foo', :format => 'pdf'
|
||||
end
|
||||
end
|
40
test/integration/routing/groups_test.rb
Normal file
40
test/integration/routing/groups_test.rb
Normal file
|
@ -0,0 +1,40 @@
|
|||
# Redmine - project management software
|
||||
# Copyright (C) 2006-2017 Jean-Philippe Lang
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or
|
||||
# modify it under the terms of the GNU General Public License
|
||||
# as published by the Free Software Foundation; either version 2
|
||||
# of the License, or (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program; if not, write to the Free Software
|
||||
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||
|
||||
require File.expand_path('../../../test_helper', __FILE__)
|
||||
|
||||
class RoutingGroupsTest < Redmine::RoutingTest
|
||||
def test_groups
|
||||
should_route 'GET /groups' => 'groups#index'
|
||||
should_route 'GET /groups/new' => 'groups#new'
|
||||
should_route 'POST /groups' => 'groups#create'
|
||||
|
||||
should_route 'GET /groups/1' => 'groups#show', :id => '1'
|
||||
should_route 'GET /groups/1/edit' => 'groups#edit', :id => '1'
|
||||
should_route 'PUT /groups/1' => 'groups#update', :id => '1'
|
||||
should_route 'DELETE /groups/1' => 'groups#destroy', :id => '1'
|
||||
|
||||
should_route 'GET /groups/1/autocomplete_for_user' => 'groups#autocomplete_for_user', :id => '1'
|
||||
should_route 'GET /groups/1/autocomplete_for_user.js' => 'groups#autocomplete_for_user', :id => '1', :format => 'js'
|
||||
end
|
||||
|
||||
def test_group_users
|
||||
should_route 'GET /groups/567/users/new' => 'groups#new_users', :id => '567'
|
||||
should_route 'POST /groups/567/users' => 'groups#add_users', :id => '567'
|
||||
should_route 'DELETE /groups/567/users/12' => 'groups#remove_user', :id => '567', :user_id => '12'
|
||||
end
|
||||
end
|
36
test/integration/routing/imports_test.rb
Normal file
36
test/integration/routing/imports_test.rb
Normal file
|
@ -0,0 +1,36 @@
|
|||
# Redmine - project management software
|
||||
# Copyright (C) 2006-2017 Jean-Philippe Lang
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or
|
||||
# modify it under the terms of the GNU General Public License
|
||||
# as published by the Free Software Foundation; either version 2
|
||||
# of the License, or (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program; if not, write to the Free Software
|
||||
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||
|
||||
require File.expand_path('../../../test_helper', __FILE__)
|
||||
|
||||
class RoutingImportsTest < Redmine::RoutingTest
|
||||
def test_imports
|
||||
should_route 'GET /issues/imports/new' => 'imports#new'
|
||||
should_route 'POST /imports' => 'imports#create'
|
||||
|
||||
should_route 'GET /imports/4ae6bc' => 'imports#show', :id => '4ae6bc'
|
||||
|
||||
should_route 'GET /imports/4ae6bc/settings' => 'imports#settings', :id => '4ae6bc'
|
||||
should_route 'POST /imports/4ae6bc/settings' => 'imports#settings', :id => '4ae6bc'
|
||||
|
||||
should_route 'GET /imports/4ae6bc/mapping' => 'imports#mapping', :id => '4ae6bc'
|
||||
should_route 'POST /imports/4ae6bc/mapping' => 'imports#mapping', :id => '4ae6bc'
|
||||
|
||||
should_route 'GET /imports/4ae6bc/run' => 'imports#run', :id => '4ae6bc'
|
||||
should_route 'POST /imports/4ae6bc/run' => 'imports#run', :id => '4ae6bc'
|
||||
end
|
||||
end
|
32
test/integration/routing/issue_categories_test.rb
Normal file
32
test/integration/routing/issue_categories_test.rb
Normal file
|
@ -0,0 +1,32 @@
|
|||
# Redmine - project management software
|
||||
# Copyright (C) 2006-2017 Jean-Philippe Lang
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or
|
||||
# modify it under the terms of the GNU General Public License
|
||||
# as published by the Free Software Foundation; either version 2
|
||||
# of the License, or (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program; if not, write to the Free Software
|
||||
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||
|
||||
require File.expand_path('../../../test_helper', __FILE__)
|
||||
|
||||
class RoutingIssueCategoriesTest < Redmine::RoutingTest
|
||||
def test_issue_categories_scoped_under_project
|
||||
should_route 'GET /projects/foo/issue_categories' => 'issue_categories#index', :project_id => 'foo'
|
||||
should_route 'GET /projects/foo/issue_categories/new' => 'issue_categories#new', :project_id => 'foo'
|
||||
should_route 'POST /projects/foo/issue_categories' => 'issue_categories#create', :project_id => 'foo'
|
||||
end
|
||||
|
||||
def test_issue_categories
|
||||
should_route 'GET /issue_categories/1/edit' => 'issue_categories#edit', :id => '1'
|
||||
should_route 'PUT /issue_categories/1' => 'issue_categories#update', :id => '1'
|
||||
should_route 'DELETE /issue_categories/1' => 'issue_categories#destroy', :id => '1'
|
||||
end
|
||||
end
|
27
test/integration/routing/issue_relations_test.rb
Normal file
27
test/integration/routing/issue_relations_test.rb
Normal file
|
@ -0,0 +1,27 @@
|
|||
# Redmine - project management software
|
||||
# Copyright (C) 2006-2017 Jean-Philippe Lang
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or
|
||||
# modify it under the terms of the GNU General Public License
|
||||
# as published by the Free Software Foundation; either version 2
|
||||
# of the License, or (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program; if not, write to the Free Software
|
||||
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||
|
||||
require File.expand_path('../../../test_helper', __FILE__)
|
||||
|
||||
class RoutingIssueRelationsTest < Redmine::RoutingTest
|
||||
def test_issue_relations
|
||||
should_route 'GET /issues/1/relations' => 'issue_relations#index', :issue_id => '1'
|
||||
should_route 'POST /issues/1/relations' => 'issue_relations#create', :issue_id => '1'
|
||||
|
||||
should_route 'DELETE /relations/23' => 'issue_relations#destroy', :id => '23'
|
||||
end
|
||||
end
|
32
test/integration/routing/issue_statuses_test.rb
Normal file
32
test/integration/routing/issue_statuses_test.rb
Normal file
|
@ -0,0 +1,32 @@
|
|||
# Redmine - project management software
|
||||
# Copyright (C) 2006-2017 Jean-Philippe Lang
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or
|
||||
# modify it under the terms of the GNU General Public License
|
||||
# as published by the Free Software Foundation; either version 2
|
||||
# of the License, or (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program; if not, write to the Free Software
|
||||
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||
|
||||
require File.expand_path('../../../test_helper', __FILE__)
|
||||
|
||||
class RoutingIssueStatusesTest < Redmine::RoutingTest
|
||||
def test_issue_statuses
|
||||
should_route 'GET /issue_statuses' => 'issue_statuses#index'
|
||||
should_route 'POST /issue_statuses' => 'issue_statuses#create'
|
||||
should_route 'GET /issue_statuses/new' => 'issue_statuses#new'
|
||||
|
||||
should_route 'GET /issue_statuses/1/edit' => 'issue_statuses#edit', :id => '1'
|
||||
should_route 'PUT /issue_statuses/1' => 'issue_statuses#update', :id => '1'
|
||||
should_route 'DELETE /issue_statuses/1' => 'issue_statuses#destroy', :id => '1'
|
||||
|
||||
should_route 'POST /issue_statuses/update_issue_done_ratio' => 'issue_statuses#update_issue_done_ratio'
|
||||
end
|
||||
end
|
60
test/integration/routing/issues_test.rb
Normal file
60
test/integration/routing/issues_test.rb
Normal file
|
@ -0,0 +1,60 @@
|
|||
# Redmine - project management software
|
||||
# Copyright (C) 2006-2017 Jean-Philippe Lang
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or
|
||||
# modify it under the terms of the GNU General Public License
|
||||
# as published by the Free Software Foundation; either version 2
|
||||
# of the License, or (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program; if not, write to the Free Software
|
||||
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||
|
||||
require File.expand_path('../../../test_helper', __FILE__)
|
||||
|
||||
class RoutingIssuesTest < Redmine::RoutingTest
|
||||
def test_issues
|
||||
should_route 'GET /issues' => 'issues#index'
|
||||
should_route 'GET /issues.pdf' => 'issues#index', :format => 'pdf'
|
||||
should_route 'GET /issues.atom' => 'issues#index', :format => 'atom'
|
||||
|
||||
should_route 'GET /issues/64' => 'issues#show', :id => '64'
|
||||
should_route 'GET /issues/64.pdf' => 'issues#show', :id => '64', :format => 'pdf'
|
||||
should_route 'GET /issues/64.atom' => 'issues#show', :id => '64', :format => 'atom'
|
||||
|
||||
should_route 'GET /issues/new' => 'issues#new'
|
||||
should_route 'POST /issues' => 'issues#create'
|
||||
|
||||
should_route 'GET /issues/64/edit' => 'issues#edit', :id => '64'
|
||||
should_route 'PUT /issues/64' => 'issues#update', :id => '64'
|
||||
should_route 'DELETE /issues/64' => 'issues#destroy', :id => '64'
|
||||
end
|
||||
|
||||
def test_issues_bulk_edit
|
||||
should_route 'GET /issues/bulk_edit' => 'issues#bulk_edit'
|
||||
should_route 'POST /issues/bulk_edit' => 'issues#bulk_edit' # For updating the bulk edit form
|
||||
should_route 'POST /issues/bulk_update' => 'issues#bulk_update'
|
||||
end
|
||||
|
||||
def test_issues_scoped_under_project
|
||||
should_route 'GET /projects/23/issues' => 'issues#index', :project_id => '23'
|
||||
should_route 'GET /projects/23/issues.pdf' => 'issues#index', :project_id => '23', :format => 'pdf'
|
||||
should_route 'GET /projects/23/issues.atom' => 'issues#index', :project_id => '23', :format => 'atom'
|
||||
|
||||
should_route 'GET /projects/23/issues/new' => 'issues#new', :project_id => '23'
|
||||
should_route 'POST /projects/23/issues' => 'issues#create', :project_id => '23'
|
||||
|
||||
should_route 'GET /projects/23/issues/64/copy' => 'issues#new', :project_id => '23', :copy_from => '64'
|
||||
end
|
||||
|
||||
def test_issues_form_update
|
||||
should_route 'POST /issues/new' => 'issues#new'
|
||||
should_route 'POST /projects/23/issues/new' => 'issues#new', :project_id => '23'
|
||||
should_route 'PATCH /issues/23/edit' => 'issues#edit', :id => '23'
|
||||
end
|
||||
end
|
29
test/integration/routing/journals_test.rb
Normal file
29
test/integration/routing/journals_test.rb
Normal file
|
@ -0,0 +1,29 @@
|
|||
# Redmine - project management software
|
||||
# Copyright (C) 2006-2017 Jean-Philippe Lang
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or
|
||||
# modify it under the terms of the GNU General Public License
|
||||
# as published by the Free Software Foundation; either version 2
|
||||
# of the License, or (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program; if not, write to the Free Software
|
||||
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||
|
||||
require File.expand_path('../../../test_helper', __FILE__)
|
||||
|
||||
class RoutingJournalsTest < Redmine::RoutingTest
|
||||
def test_journals
|
||||
should_route 'POST /issues/1/quoted' => 'journals#new', :id => '1'
|
||||
should_route 'GET /issues/changes' => 'journals#index'
|
||||
should_route 'GET /journals/1/diff' => 'journals#diff', :id => '1'
|
||||
|
||||
should_route 'GET /journals/1/edit' => 'journals#edit', :id => '1'
|
||||
should_route 'PUT /journals/1' => 'journals#update', :id => '1'
|
||||
end
|
||||
end
|
25
test/integration/routing/mail_handler_test.rb
Normal file
25
test/integration/routing/mail_handler_test.rb
Normal file
|
@ -0,0 +1,25 @@
|
|||
# Redmine - project management software
|
||||
# Copyright (C) 2006-2017 Jean-Philippe Lang
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or
|
||||
# modify it under the terms of the GNU General Public License
|
||||
# as published by the Free Software Foundation; either version 2
|
||||
# of the License, or (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program; if not, write to the Free Software
|
||||
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||
|
||||
require File.expand_path('../../../test_helper', __FILE__)
|
||||
|
||||
class RoutingMailHandlerTest < Redmine::RoutingTest
|
||||
def test_mail_handler
|
||||
should_route 'GET /mail_handler' => 'mail_handler#new'
|
||||
should_route 'POST /mail_handler' => 'mail_handler#index'
|
||||
end
|
||||
end
|
32
test/integration/routing/members_test.rb
Normal file
32
test/integration/routing/members_test.rb
Normal file
|
@ -0,0 +1,32 @@
|
|||
# Redmine - project management software
|
||||
# Copyright (C) 2006-2017 Jean-Philippe Lang
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or
|
||||
# modify it under the terms of the GNU General Public License
|
||||
# as published by the Free Software Foundation; either version 2
|
||||
# of the License, or (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program; if not, write to the Free Software
|
||||
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||
|
||||
require File.expand_path('../../../test_helper', __FILE__)
|
||||
|
||||
class RoutingMembersTest < Redmine::RoutingTest
|
||||
def test_members
|
||||
should_route 'GET /projects/foo/memberships/new' => 'members#new', :project_id => 'foo'
|
||||
should_route 'POST /projects/foo/memberships' => 'members#create', :project_id => 'foo'
|
||||
|
||||
should_route 'GET /memberships/5234/edit' => 'members#edit', :id => '5234'
|
||||
should_route 'PUT /memberships/5234' => 'members#update', :id => '5234'
|
||||
should_route 'DELETE /memberships/5234' => 'members#destroy', :id => '5234'
|
||||
|
||||
should_route 'GET /projects/foo/memberships/autocomplete' => 'members#autocomplete', :project_id => 'foo'
|
||||
should_route 'GET /projects/foo/memberships/autocomplete.js' => 'members#autocomplete', :project_id => 'foo', :format => 'js'
|
||||
end
|
||||
end
|
33
test/integration/routing/messages_test.rb
Normal file
33
test/integration/routing/messages_test.rb
Normal file
|
@ -0,0 +1,33 @@
|
|||
# Redmine - project management software
|
||||
# Copyright (C) 2006-2017 Jean-Philippe Lang
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or
|
||||
# modify it under the terms of the GNU General Public License
|
||||
# as published by the Free Software Foundation; either version 2
|
||||
# of the License, or (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program; if not, write to the Free Software
|
||||
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||
|
||||
require File.expand_path('../../../test_helper', __FILE__)
|
||||
|
||||
class RoutingMessagesTest < Redmine::RoutingTest
|
||||
def test_messages
|
||||
# TODO: refactor routes
|
||||
should_route 'GET /boards/22/topics/new' => 'messages#new', :board_id => '22'
|
||||
should_route 'POST /boards/22/topics/new' => 'messages#new', :board_id => '22'
|
||||
should_route 'POST /boards/22/topics/preview' => 'messages#preview', :board_id => '22'
|
||||
|
||||
should_route 'GET /boards/22/topics/2' => 'messages#show', :id => '2', :board_id => '22'
|
||||
should_route 'GET /boards/22/topics/2/edit' => 'messages#edit', :id => '2', :board_id => '22'
|
||||
should_route 'POST /boards/22/topics/quote/2' => 'messages#quote', :id => '2', :board_id => '22'
|
||||
should_route 'POST /boards/22/topics/2/replies' => 'messages#reply', :id => '2', :board_id => '22'
|
||||
should_route 'POST /boards/22/topics/2/destroy' => 'messages#destroy', :id => '2', :board_id => '22'
|
||||
end
|
||||
end
|
43
test/integration/routing/my_test.rb
Normal file
43
test/integration/routing/my_test.rb
Normal file
|
@ -0,0 +1,43 @@
|
|||
# Redmine - project management software
|
||||
# Copyright (C) 2006-2017 Jean-Philippe Lang
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or
|
||||
# modify it under the terms of the GNU General Public License
|
||||
# as published by the Free Software Foundation; either version 2
|
||||
# of the License, or (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program; if not, write to the Free Software
|
||||
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||
|
||||
require File.expand_path('../../../test_helper', __FILE__)
|
||||
|
||||
class RoutingMyTest < Redmine::RoutingTest
|
||||
def test_my
|
||||
should_route 'GET /my/account' => 'my#account'
|
||||
should_route 'POST /my/account' => 'my#account'
|
||||
|
||||
should_route 'GET /my/account/destroy' => 'my#destroy'
|
||||
should_route 'POST /my/account/destroy' => 'my#destroy'
|
||||
|
||||
should_route 'GET /my/page' => 'my#page'
|
||||
should_route 'POST /my/page' => 'my#update_page'
|
||||
should_route 'GET /my' => 'my#index'
|
||||
|
||||
should_route 'GET /my/api_key' => 'my#show_api_key'
|
||||
should_route 'POST /my/api_key' => 'my#reset_api_key'
|
||||
should_route 'POST /my/rss_key' => 'my#reset_rss_key'
|
||||
|
||||
should_route 'GET /my/password' => 'my#password'
|
||||
should_route 'POST /my/password' => 'my#password'
|
||||
|
||||
should_route 'POST /my/add_block' => 'my#add_block'
|
||||
should_route 'POST /my/remove_block' => 'my#remove_block'
|
||||
should_route 'POST /my/order_blocks' => 'my#order_blocks'
|
||||
end
|
||||
end
|
36
test/integration/routing/news_test.rb
Normal file
36
test/integration/routing/news_test.rb
Normal file
|
@ -0,0 +1,36 @@
|
|||
# Redmine - project management software
|
||||
# Copyright (C) 2006-2017 Jean-Philippe Lang
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or
|
||||
# modify it under the terms of the GNU General Public License
|
||||
# as published by the Free Software Foundation; either version 2
|
||||
# of the License, or (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program; if not, write to the Free Software
|
||||
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||
|
||||
require File.expand_path('../../../test_helper', __FILE__)
|
||||
|
||||
class RoutingNewsTest < Redmine::RoutingTest
|
||||
def test_news_scoped_under_project
|
||||
should_route 'GET /projects/foo/news' => 'news#index', :project_id => 'foo'
|
||||
should_route 'GET /projects/foo/news.atom' => 'news#index', :project_id => 'foo', :format => 'atom'
|
||||
should_route 'GET /projects/foo/news/new' => 'news#new', :project_id => 'foo'
|
||||
should_route 'POST /projects/foo/news' => 'news#create', :project_id => 'foo'
|
||||
end
|
||||
|
||||
def test_news
|
||||
should_route 'GET /news' => 'news#index'
|
||||
should_route 'GET /news.atom' => 'news#index', :format => 'atom'
|
||||
should_route 'GET /news/2' => 'news#show', :id => '2'
|
||||
should_route 'GET /news/2/edit' => 'news#edit', :id => '2'
|
||||
should_route 'PUT /news/2' => 'news#update', :id => '2'
|
||||
should_route 'DELETE /news/2' => 'news#destroy', :id => '2'
|
||||
end
|
||||
end
|
32
test/integration/routing/previews_test.rb
Normal file
32
test/integration/routing/previews_test.rb
Normal file
|
@ -0,0 +1,32 @@
|
|||
# Redmine - project management software
|
||||
# Copyright (C) 2006-2017 Jean-Philippe Lang
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or
|
||||
# modify it under the terms of the GNU General Public License
|
||||
# as published by the Free Software Foundation; either version 2
|
||||
# of the License, or (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program; if not, write to the Free Software
|
||||
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||
|
||||
require File.expand_path('../../../test_helper', __FILE__)
|
||||
|
||||
class RoutingPreviewsTest < Redmine::RoutingTest
|
||||
def test_previews
|
||||
should_route 'GET /issues/preview/new/foo' => 'previews#issue', :project_id => 'foo'
|
||||
should_route 'PUT /issues/preview/new/foo' => 'previews#issue', :project_id => 'foo'
|
||||
should_route 'POST /issues/preview/new/foo' => 'previews#issue', :project_id => 'foo'
|
||||
|
||||
should_route 'GET /issues/preview/edit/321' => 'previews#issue', :id => '321'
|
||||
should_route 'PUT /issues/preview/edit/321' => 'previews#issue', :id => '321'
|
||||
should_route 'POST /issues/preview/edit/321' => 'previews#issue', :id => '321'
|
||||
|
||||
should_route 'GET /news/preview' => 'previews#news'
|
||||
end
|
||||
end
|
36
test/integration/routing/principal_memberships_test.rb
Normal file
36
test/integration/routing/principal_memberships_test.rb
Normal file
|
@ -0,0 +1,36 @@
|
|||
# Redmine - project management software
|
||||
# Copyright (C) 2006-2017 Jean-Philippe Lang
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or
|
||||
# modify it under the terms of the GNU General Public License
|
||||
# as published by the Free Software Foundation; either version 2
|
||||
# of the License, or (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program; if not, write to the Free Software
|
||||
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||
|
||||
require File.expand_path('../../../test_helper', __FILE__)
|
||||
|
||||
class RoutingPrincipalMembershipsTest < Redmine::RoutingTest
|
||||
def test_user_memberships
|
||||
should_route 'GET /users/123/memberships/new' => 'principal_memberships#new', :user_id => '123'
|
||||
should_route 'POST /users/123/memberships' => 'principal_memberships#create', :user_id => '123'
|
||||
should_route 'GET /users/123/memberships/55/edit' => 'principal_memberships#edit', :user_id => '123', :id => '55'
|
||||
should_route 'PUT /users/123/memberships/55' => 'principal_memberships#update', :user_id => '123', :id => '55'
|
||||
should_route 'DELETE /users/123/memberships/55' => 'principal_memberships#destroy', :user_id => '123', :id => '55'
|
||||
end
|
||||
|
||||
def test_group_memberships
|
||||
should_route 'GET /groups/123/memberships/new' => 'principal_memberships#new', :group_id => '123'
|
||||
should_route 'POST /groups/123/memberships' => 'principal_memberships#create', :group_id => '123'
|
||||
should_route 'GET /groups/123/memberships/55/edit' => 'principal_memberships#edit', :group_id => '123', :id => '55'
|
||||
should_route 'PUT /groups/123/memberships/55' => 'principal_memberships#update', :group_id => '123', :id => '55'
|
||||
should_route 'DELETE /groups/123/memberships/55' => 'principal_memberships#destroy', :group_id => '123', :id => '55'
|
||||
end
|
||||
end
|
25
test/integration/routing/project_enumerations_test.rb
Normal file
25
test/integration/routing/project_enumerations_test.rb
Normal file
|
@ -0,0 +1,25 @@
|
|||
# Redmine - project management software
|
||||
# Copyright (C) 2006-2017 Jean-Philippe Lang
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or
|
||||
# modify it under the terms of the GNU General Public License
|
||||
# as published by the Free Software Foundation; either version 2
|
||||
# of the License, or (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program; if not, write to the Free Software
|
||||
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||
|
||||
require File.expand_path('../../../test_helper', __FILE__)
|
||||
|
||||
class RoutingProjectEnumerationsTest < Redmine::RoutingTest
|
||||
def test_project_enumerations
|
||||
should_route 'PUT /projects/foo/enumerations' => 'project_enumerations#update', :project_id => 'foo'
|
||||
should_route 'DELETE /projects/foo/enumerations' => 'project_enumerations#destroy', :project_id => 'foo'
|
||||
end
|
||||
end
|
41
test/integration/routing/projects_test.rb
Normal file
41
test/integration/routing/projects_test.rb
Normal file
|
@ -0,0 +1,41 @@
|
|||
# Redmine - project management software
|
||||
# Copyright (C) 2006-2017 Jean-Philippe Lang
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or
|
||||
# modify it under the terms of the GNU General Public License
|
||||
# as published by the Free Software Foundation; either version 2
|
||||
# of the License, or (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program; if not, write to the Free Software
|
||||
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||
|
||||
require File.expand_path('../../../test_helper', __FILE__)
|
||||
|
||||
class RoutingProjectsTest < Redmine::RoutingTest
|
||||
def test_projects
|
||||
should_route 'GET /projects' => 'projects#index'
|
||||
should_route 'GET /projects.atom' => 'projects#index', :format => 'atom'
|
||||
should_route 'GET /projects/new' => 'projects#new'
|
||||
should_route 'POST /projects' => 'projects#create'
|
||||
|
||||
should_route 'GET /projects/autocomplete.js' => 'projects#autocomplete', :format => 'js'
|
||||
|
||||
should_route 'GET /projects/foo' => 'projects#show', :id => 'foo'
|
||||
should_route 'PUT /projects/foo' => 'projects#update', :id => 'foo'
|
||||
should_route 'DELETE /projects/foo' => 'projects#destroy', :id => 'foo'
|
||||
|
||||
should_route 'GET /projects/foo/settings' => 'projects#settings', :id => 'foo'
|
||||
should_route 'GET /projects/foo/settings/members' => 'projects#settings', :id => 'foo', :tab => 'members'
|
||||
|
||||
should_route 'POST /projects/foo/archive' => 'projects#archive', :id => 'foo'
|
||||
should_route 'POST /projects/foo/unarchive' => 'projects#unarchive', :id => 'foo'
|
||||
should_route 'POST /projects/foo/close' => 'projects#close', :id => 'foo'
|
||||
should_route 'POST /projects/foo/reopen' => 'projects#reopen', :id => 'foo'
|
||||
end
|
||||
end
|
35
test/integration/routing/queries_test.rb
Normal file
35
test/integration/routing/queries_test.rb
Normal file
|
@ -0,0 +1,35 @@
|
|||
# Redmine - project management software
|
||||
# Copyright (C) 2006-2017 Jean-Philippe Lang
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or
|
||||
# modify it under the terms of the GNU General Public License
|
||||
# as published by the Free Software Foundation; either version 2
|
||||
# of the License, or (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program; if not, write to the Free Software
|
||||
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||
|
||||
require File.expand_path('../../../test_helper', __FILE__)
|
||||
|
||||
class RoutingQueriesTest < Redmine::RoutingTest
|
||||
def test_queries
|
||||
should_route 'GET /queries/new' => 'queries#new'
|
||||
should_route 'POST /queries' => 'queries#create'
|
||||
should_route 'GET /queries/filter' => 'queries#filter'
|
||||
|
||||
should_route 'GET /queries/1/edit' => 'queries#edit', :id => '1'
|
||||
should_route 'PUT /queries/1' => 'queries#update', :id => '1'
|
||||
should_route 'DELETE /queries/1' => 'queries#destroy', :id => '1'
|
||||
end
|
||||
|
||||
def test_queries_scoped_under_project
|
||||
should_route 'GET /projects/foo/queries/new' => 'queries#new', :project_id => 'foo'
|
||||
should_route 'POST /projects/foo/queries' => 'queries#create', :project_id => 'foo'
|
||||
end
|
||||
end
|
25
test/integration/routing/reports_test.rb
Normal file
25
test/integration/routing/reports_test.rb
Normal file
|
@ -0,0 +1,25 @@
|
|||
# Redmine - project management software
|
||||
# Copyright (C) 2006-2017 Jean-Philippe Lang
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or
|
||||
# modify it under the terms of the GNU General Public License
|
||||
# as published by the Free Software Foundation; either version 2
|
||||
# of the License, or (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program; if not, write to the Free Software
|
||||
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||
|
||||
require File.expand_path('../../../test_helper', __FILE__)
|
||||
|
||||
class RoutingReportsTest < Redmine::RoutingTest
|
||||
def test_reports
|
||||
should_route 'GET /projects/foo/issues/report' => 'reports#issue_report', :id => 'foo'
|
||||
should_route 'GET /projects/foo/issues/report/assigned_to' => 'reports#issue_report_details', :id => 'foo', :detail => 'assigned_to'
|
||||
end
|
||||
end
|
139
test/integration/routing/repositories_test.rb
Normal file
139
test/integration/routing/repositories_test.rb
Normal file
|
@ -0,0 +1,139 @@
|
|||
# Redmine - project management software
|
||||
# Copyright (C) 2006-2017 Jean-Philippe Lang
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or
|
||||
# modify it under the terms of the GNU General Public License
|
||||
# as published by the Free Software Foundation; either version 2
|
||||
# of the License, or (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program; if not, write to the Free Software
|
||||
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||
|
||||
require File.expand_path('../../../test_helper', __FILE__)
|
||||
|
||||
class RoutingRepositoriesTest < Redmine::RoutingTest
|
||||
def setup
|
||||
@path_hash = repository_path_hash(%w[path to file.c])
|
||||
assert_equal "path/to/file.c", @path_hash[:path]
|
||||
assert_equal "path/to/file.c", @path_hash[:param]
|
||||
end
|
||||
|
||||
def test_repositories_resources
|
||||
should_route 'GET /projects/foo/repositories/new' => 'repositories#new', :project_id => 'foo'
|
||||
should_route 'POST /projects/foo/repositories' => 'repositories#create', :project_id => 'foo'
|
||||
should_route 'GET /repositories/1/edit' => 'repositories#edit', :id => '1'
|
||||
should_route 'PUT /repositories/1' => 'repositories#update', :id => '1'
|
||||
should_route 'DELETE /repositories/1' => 'repositories#destroy', :id => '1'
|
||||
|
||||
should_route 'GET /repositories/1/committers' => 'repositories#committers', :id => '1'
|
||||
should_route 'POST /repositories/1/committers' => 'repositories#committers', :id => '1'
|
||||
end
|
||||
|
||||
def test_repositories
|
||||
should_route 'GET /projects/foo/repository' => 'repositories#show', :id => 'foo'
|
||||
should_route 'GET /projects/foo/repository/statistics' => 'repositories#stats', :id => 'foo'
|
||||
should_route 'GET /projects/foo/repository/graph' => 'repositories#graph', :id => 'foo'
|
||||
end
|
||||
|
||||
def test_repositories_with_repository_id
|
||||
should_route 'GET /projects/foo/repository/svn' => 'repositories#show', :id => 'foo', :repository_id => 'svn'
|
||||
should_route 'GET /projects/foo/repository/svn/statistics' => 'repositories#stats', :id => 'foo', :repository_id => 'svn'
|
||||
should_route 'GET /projects/foo/repository/svn/graph' => 'repositories#graph', :id => 'foo', :repository_id => 'svn'
|
||||
end
|
||||
|
||||
def test_repositories_revisions
|
||||
should_route 'GET /projects/foo/repository/revision' => 'repositories#revision', :id => 'foo'
|
||||
should_route 'GET /projects/foo/repository/revisions' => 'repositories#revisions', :id => 'foo'
|
||||
should_route 'GET /projects/foo/repository/revisions.atom' => 'repositories#revisions', :id => 'foo', :format => 'atom'
|
||||
|
||||
should_route 'GET /projects/foo/repository/revisions/2457' => 'repositories#revision', :id => 'foo', :rev => '2457'
|
||||
should_route 'GET /projects/foo/repository/revisions/2457/show' => 'repositories#show', :id => 'foo', :rev => '2457'
|
||||
should_route 'GET /projects/foo/repository/revisions/2457/diff' => 'repositories#diff', :id => 'foo', :rev => '2457'
|
||||
|
||||
should_route "GET /projects/foo/repository/revisions/2457/show/#{@path_hash[:path]}" => 'repositories#show',
|
||||
:id => 'foo', :rev => '2457', :path => @path_hash[:param]
|
||||
should_route "GET /projects/foo/repository/revisions/2457/diff/#{@path_hash[:path]}" => 'repositories#diff',
|
||||
:id => 'foo', :rev => '2457', :path => @path_hash[:param]
|
||||
should_route "GET /projects/foo/repository/revisions/2457/entry/#{@path_hash[:path]}" => 'repositories#entry',
|
||||
:id => 'foo', :rev => '2457', :path => @path_hash[:param]
|
||||
should_route "GET /projects/foo/repository/revisions/2457/raw/#{@path_hash[:path]}" => 'repositories#raw',
|
||||
:id => 'foo', :rev => '2457', :path => @path_hash[:param]
|
||||
should_route "GET /projects/foo/repository/revisions/2457/annotate/#{@path_hash[:path]}" => 'repositories#annotate',
|
||||
:id => 'foo', :rev => '2457', :path => @path_hash[:param]
|
||||
end
|
||||
|
||||
def test_repositories_revisions_with_repository_id
|
||||
should_route 'GET /projects/foo/repository/foo/revision' => 'repositories#revision', :id => 'foo', :repository_id => 'foo'
|
||||
should_route 'GET /projects/foo/repository/foo/revisions' => 'repositories#revisions', :id => 'foo', :repository_id => 'foo'
|
||||
should_route 'GET /projects/foo/repository/foo/revisions.atom' => 'repositories#revisions', :id => 'foo', :repository_id => 'foo', :format => 'atom'
|
||||
|
||||
should_route 'GET /projects/foo/repository/foo/revisions/2457' => 'repositories#revision', :id => 'foo', :repository_id => 'foo', :rev => '2457'
|
||||
should_route 'GET /projects/foo/repository/foo/revisions/2457/show' => 'repositories#show', :id => 'foo', :repository_id => 'foo', :rev => '2457'
|
||||
should_route 'GET /projects/foo/repository/foo/revisions/2457/diff' => 'repositories#diff', :id => 'foo', :repository_id => 'foo', :rev => '2457'
|
||||
|
||||
should_route "GET /projects/foo/repository/foo/revisions/2457/show/#{@path_hash[:path]}" => 'repositories#show',
|
||||
:id => 'foo', :repository_id => 'foo', :rev => '2457', :path => @path_hash[:param]
|
||||
should_route "GET /projects/foo/repository/foo/revisions/2457/diff/#{@path_hash[:path]}" => 'repositories#diff',
|
||||
:id => 'foo', :repository_id => 'foo', :rev => '2457', :path => @path_hash[:param]
|
||||
should_route "GET /projects/foo/repository/foo/revisions/2457/entry/#{@path_hash[:path]}" => 'repositories#entry',
|
||||
:id => 'foo', :repository_id => 'foo', :rev => '2457', :path => @path_hash[:param]
|
||||
should_route "GET /projects/foo/repository/foo/revisions/2457/raw/#{@path_hash[:path]}" => 'repositories#raw',
|
||||
:id => 'foo', :repository_id => 'foo', :rev => '2457', :path => @path_hash[:param]
|
||||
should_route "GET /projects/foo/repository/foo/revisions/2457/annotate/#{@path_hash[:path]}" => 'repositories#annotate',
|
||||
:id => 'foo', :repository_id => 'foo', :rev => '2457', :path => @path_hash[:param]
|
||||
end
|
||||
|
||||
def test_repositories_non_revisions_path
|
||||
should_route 'GET /projects/foo/repository/changes' => 'repositories#changes', :id => 'foo'
|
||||
|
||||
should_route "GET /projects/foo/repository/changes/#{@path_hash[:path]}" => 'repositories#changes',
|
||||
:id => 'foo', :path => @path_hash[:param]
|
||||
should_route "GET /projects/foo/repository/diff/#{@path_hash[:path]}" => 'repositories#diff',
|
||||
:id => 'foo', :path => @path_hash[:param]
|
||||
should_route "GET /projects/foo/repository/browse/#{@path_hash[:path]}" => 'repositories#browse',
|
||||
:id => 'foo', :path => @path_hash[:param]
|
||||
should_route "GET /projects/foo/repository/entry/#{@path_hash[:path]}" => 'repositories#entry',
|
||||
:id => 'foo', :path => @path_hash[:param]
|
||||
should_route "GET /projects/foo/repository/raw/#{@path_hash[:path]}" => 'repositories#raw',
|
||||
:id => 'foo', :path => @path_hash[:param]
|
||||
should_route "GET /projects/foo/repository/annotate/#{@path_hash[:path]}" => 'repositories#annotate',
|
||||
:id => 'foo', :path => @path_hash[:param]
|
||||
end
|
||||
|
||||
def test_repositories_non_revisions_path_with_repository_id
|
||||
should_route 'GET /projects/foo/repository/svn/changes' => 'repositories#changes', :id => 'foo', :repository_id => 'svn'
|
||||
|
||||
should_route "GET /projects/foo/repository/svn/changes/#{@path_hash[:path]}" => 'repositories#changes',
|
||||
:id => 'foo', :repository_id => 'svn', :path => @path_hash[:param]
|
||||
should_route "GET /projects/foo/repository/svn/diff/#{@path_hash[:path]}" => 'repositories#diff',
|
||||
:id => 'foo', :repository_id => 'svn', :path => @path_hash[:param]
|
||||
should_route "GET /projects/foo/repository/svn/browse/#{@path_hash[:path]}" => 'repositories#browse',
|
||||
:id => 'foo', :repository_id => 'svn', :path => @path_hash[:param]
|
||||
should_route "GET /projects/foo/repository/svn/entry/#{@path_hash[:path]}" => 'repositories#entry',
|
||||
:id => 'foo', :repository_id => 'svn', :path => @path_hash[:param]
|
||||
should_route "GET /projects/foo/repository/svn/raw/#{@path_hash[:path]}" => 'repositories#raw',
|
||||
:id => 'foo', :repository_id => 'svn', :path => @path_hash[:param]
|
||||
should_route "GET /projects/foo/repository/svn/annotate/#{@path_hash[:path]}" => 'repositories#annotate',
|
||||
:id => 'foo', :repository_id => 'svn', :path => @path_hash[:param]
|
||||
end
|
||||
|
||||
def test_repositories_related_issues
|
||||
should_route 'POST /projects/foo/repository/revisions/123/issues' => 'repositories#add_related_issue',
|
||||
:id => 'foo', :rev => '123'
|
||||
should_route 'DELETE /projects/foo/repository/revisions/123/issues/25' => 'repositories#remove_related_issue',
|
||||
:id => 'foo', :rev => '123', :issue_id => '25'
|
||||
end
|
||||
|
||||
def test_repositories_related_issues_with_repository_id
|
||||
should_route 'POST /projects/foo/repository/svn/revisions/123/issues' => 'repositories#add_related_issue',
|
||||
:id => 'foo', :repository_id => 'svn', :rev => '123'
|
||||
should_route 'DELETE /projects/foo/repository/svn/revisions/123/issues/25' => 'repositories#remove_related_issue',
|
||||
:id => 'foo', :repository_id => 'svn', :rev => '123', :issue_id => '25'
|
||||
end
|
||||
end
|
33
test/integration/routing/roles_test.rb
Normal file
33
test/integration/routing/roles_test.rb
Normal file
|
@ -0,0 +1,33 @@
|
|||
# Redmine - project management software
|
||||
# Copyright (C) 2006-2017 Jean-Philippe Lang
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or
|
||||
# modify it under the terms of the GNU General Public License
|
||||
# as published by the Free Software Foundation; either version 2
|
||||
# of the License, or (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program; if not, write to the Free Software
|
||||
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||
|
||||
require File.expand_path('../../../test_helper', __FILE__)
|
||||
|
||||
class RoutingRolesTest < Redmine::RoutingTest
|
||||
def test_roles
|
||||
should_route 'GET /roles' => 'roles#index'
|
||||
should_route 'GET /roles/new' => 'roles#new'
|
||||
should_route 'POST /roles' => 'roles#create'
|
||||
|
||||
should_route 'GET /roles/2/edit' => 'roles#edit', :id => '2'
|
||||
should_route 'PUT /roles/2' => 'roles#update', :id => '2'
|
||||
should_route 'DELETE /roles/2' => 'roles#destroy', :id => '2'
|
||||
|
||||
should_route 'GET /roles/permissions' => 'roles#permissions'
|
||||
should_route 'POST /roles/permissions' => 'roles#permissions'
|
||||
end
|
||||
end
|
25
test/integration/routing/search_test.rb
Normal file
25
test/integration/routing/search_test.rb
Normal file
|
@ -0,0 +1,25 @@
|
|||
# Redmine - project management software
|
||||
# Copyright (C) 2006-2017 Jean-Philippe Lang
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or
|
||||
# modify it under the terms of the GNU General Public License
|
||||
# as published by the Free Software Foundation; either version 2
|
||||
# of the License, or (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program; if not, write to the Free Software
|
||||
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||
|
||||
require File.expand_path('../../../test_helper', __FILE__)
|
||||
|
||||
class RoutingSearchTest < Redmine::RoutingTest
|
||||
def test_search
|
||||
should_route 'GET /search' => 'search#index'
|
||||
should_route 'GET /projects/foo/search' => 'search#index', :id => 'foo'
|
||||
end
|
||||
end
|
29
test/integration/routing/settings_test.rb
Normal file
29
test/integration/routing/settings_test.rb
Normal file
|
@ -0,0 +1,29 @@
|
|||
# Redmine - project management software
|
||||
# Copyright (C) 2006-2017 Jean-Philippe Lang
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or
|
||||
# modify it under the terms of the GNU General Public License
|
||||
# as published by the Free Software Foundation; either version 2
|
||||
# of the License, or (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program; if not, write to the Free Software
|
||||
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||
|
||||
require File.expand_path('../../../test_helper', __FILE__)
|
||||
|
||||
class RoutingSettingsTest < Redmine::RoutingTest
|
||||
def test_settings
|
||||
should_route 'GET /settings' => 'settings#index'
|
||||
should_route 'GET /settings/edit' => 'settings#edit'
|
||||
should_route 'POST /settings/edit' => 'settings#edit'
|
||||
|
||||
should_route 'GET /settings/plugin/testid' => 'settings#plugin', :id => 'testid'
|
||||
should_route 'POST /settings/plugin/testid' => 'settings#plugin', :id => 'testid'
|
||||
end
|
||||
end
|
27
test/integration/routing/sys_test.rb
Normal file
27
test/integration/routing/sys_test.rb
Normal file
|
@ -0,0 +1,27 @@
|
|||
# Redmine - project management software
|
||||
# Copyright (C) 2006-2017 Jean-Philippe Lang
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or
|
||||
# modify it under the terms of the GNU General Public License
|
||||
# as published by the Free Software Foundation; either version 2
|
||||
# of the License, or (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program; if not, write to the Free Software
|
||||
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||
|
||||
require File.expand_path('../../../test_helper', __FILE__)
|
||||
|
||||
class RoutingSysTest < Redmine::RoutingTest
|
||||
def test_sys
|
||||
should_route 'GET /sys/projects' => 'sys#projects'
|
||||
should_route 'POST /sys/projects/foo/repository' => 'sys#create_project_repository', :id => 'foo'
|
||||
should_route 'GET /sys/fetch_changesets' => 'sys#fetch_changesets'
|
||||
should_route 'POST /sys/fetch_changesets' => 'sys#fetch_changesets'
|
||||
end
|
||||
end
|
61
test/integration/routing/timelog_test.rb
Normal file
61
test/integration/routing/timelog_test.rb
Normal file
|
@ -0,0 +1,61 @@
|
|||
# Redmine - project management software
|
||||
# Copyright (C) 2006-2017 Jean-Philippe Lang
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or
|
||||
# modify it under the terms of the GNU General Public License
|
||||
# as published by the Free Software Foundation; either version 2
|
||||
# of the License, or (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program; if not, write to the Free Software
|
||||
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||
|
||||
require File.expand_path('../../../test_helper', __FILE__)
|
||||
|
||||
class RoutingTimelogsTest < Redmine::RoutingTest
|
||||
def test_timelogs_global
|
||||
should_route 'GET /time_entries' => 'timelog#index'
|
||||
should_route 'GET /time_entries.csv' => 'timelog#index', :format => 'csv'
|
||||
should_route 'GET /time_entries.atom' => 'timelog#index', :format => 'atom'
|
||||
should_route 'GET /time_entries/new' => 'timelog#new'
|
||||
should_route 'POST /time_entries/new' => 'timelog#new'
|
||||
should_route 'POST /time_entries' => 'timelog#create'
|
||||
|
||||
should_route 'GET /time_entries/22/edit' => 'timelog#edit', :id => '22'
|
||||
should_route 'PATCH /time_entries/22/edit' => 'timelog#edit', :id => '22'
|
||||
should_route 'PATCH /time_entries/22' => 'timelog#update', :id => '22'
|
||||
should_route 'DELETE /time_entries/22' => 'timelog#destroy', :id => '22'
|
||||
end
|
||||
|
||||
def test_timelogs_scoped_under_project
|
||||
should_route 'GET /projects/foo/time_entries' => 'timelog#index', :project_id => 'foo'
|
||||
should_route 'GET /projects/foo/time_entries.csv' => 'timelog#index', :project_id => 'foo', :format => 'csv'
|
||||
should_route 'GET /projects/foo/time_entries.atom' => 'timelog#index', :project_id => 'foo', :format => 'atom'
|
||||
should_route 'GET /projects/foo/time_entries/new' => 'timelog#new', :project_id => 'foo'
|
||||
should_route 'POST /projects/foo/time_entries' => 'timelog#create', :project_id => 'foo'
|
||||
end
|
||||
|
||||
def test_timelogs_scoped_under_issues
|
||||
should_route 'GET /issues/234/time_entries/new' => 'timelog#new', :issue_id => '234'
|
||||
should_route 'POST /issues/234/time_entries' => 'timelog#create', :issue_id => '234'
|
||||
end
|
||||
|
||||
def test_timelogs_report
|
||||
should_route 'GET /time_entries/report' => 'timelog#report'
|
||||
should_route 'GET /time_entries/report.csv' => 'timelog#report', :format => 'csv'
|
||||
|
||||
should_route 'GET /projects/foo/time_entries/report' => 'timelog#report', :project_id => 'foo'
|
||||
should_route 'GET /projects/foo/time_entries/report.csv' => 'timelog#report', :project_id => 'foo', :format => 'csv'
|
||||
end
|
||||
|
||||
def test_timelogs_bulk_edit
|
||||
should_route 'GET /time_entries/bulk_edit' => 'timelog#bulk_edit'
|
||||
should_route 'POST /time_entries/bulk_update' => 'timelog#bulk_update'
|
||||
should_route 'DELETE /time_entries/destroy' => 'timelog#destroy'
|
||||
end
|
||||
end
|
33
test/integration/routing/trackers_test.rb
Normal file
33
test/integration/routing/trackers_test.rb
Normal file
|
@ -0,0 +1,33 @@
|
|||
# Redmine - project management software
|
||||
# Copyright (C) 2006-2017 Jean-Philippe Lang
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or
|
||||
# modify it under the terms of the GNU General Public License
|
||||
# as published by the Free Software Foundation; either version 2
|
||||
# of the License, or (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program; if not, write to the Free Software
|
||||
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||
|
||||
require File.expand_path('../../../test_helper', __FILE__)
|
||||
|
||||
class RoutingTrackersTest < Redmine::RoutingTest
|
||||
def test_trackers
|
||||
should_route 'GET /trackers' => 'trackers#index'
|
||||
should_route 'GET /trackers/new' => 'trackers#new'
|
||||
should_route 'POST /trackers' => 'trackers#create'
|
||||
|
||||
should_route 'GET /trackers/1/edit' => 'trackers#edit', :id => '1'
|
||||
should_route 'PUT /trackers/1' => 'trackers#update', :id => '1'
|
||||
should_route 'DELETE /trackers/1' => 'trackers#destroy', :id => '1'
|
||||
|
||||
should_route 'GET /trackers/fields' => 'trackers#fields'
|
||||
should_route 'POST /trackers/fields' => 'trackers#fields'
|
||||
end
|
||||
end
|
32
test/integration/routing/users_test.rb
Normal file
32
test/integration/routing/users_test.rb
Normal file
|
@ -0,0 +1,32 @@
|
|||
# Redmine - project management software
|
||||
# Copyright (C) 2006-2017 Jean-Philippe Lang
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or
|
||||
# modify it under the terms of the GNU General Public License
|
||||
# as published by the Free Software Foundation; either version 2
|
||||
# of the License, or (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program; if not, write to the Free Software
|
||||
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||
|
||||
require File.expand_path('../../../test_helper', __FILE__)
|
||||
|
||||
class RoutingUsersTest < Redmine::RoutingTest
|
||||
def test_users
|
||||
should_route 'GET /users' => 'users#index'
|
||||
should_route 'GET /users/new' => 'users#new'
|
||||
should_route 'POST /users' => 'users#create'
|
||||
|
||||
should_route 'GET /users/44' => 'users#show', :id => '44'
|
||||
should_route 'GET /users/current' => 'users#show', :id => 'current'
|
||||
should_route 'GET /users/44/edit' => 'users#edit', :id => '44'
|
||||
should_route 'PUT /users/44' => 'users#update', :id => '44'
|
||||
should_route 'DELETE /users/44' => 'users#destroy', :id => '44'
|
||||
end
|
||||
end
|
36
test/integration/routing/versions_test.rb
Normal file
36
test/integration/routing/versions_test.rb
Normal file
|
@ -0,0 +1,36 @@
|
|||
# Redmine - project management software
|
||||
# Copyright (C) 2006-2017 Jean-Philippe Lang
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or
|
||||
# modify it under the terms of the GNU General Public License
|
||||
# as published by the Free Software Foundation; either version 2
|
||||
# of the License, or (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program; if not, write to the Free Software
|
||||
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||
|
||||
require File.expand_path('../../../test_helper', __FILE__)
|
||||
|
||||
class RoutingVersionsTest < Redmine::RoutingTest
|
||||
def test_project_versions
|
||||
should_route 'GET /projects/foo/roadmap' => 'versions#index', :project_id => 'foo'
|
||||
should_route 'GET /projects/foo/versions/new' => 'versions#new', :project_id => 'foo'
|
||||
should_route 'POST /projects/foo/versions' => 'versions#create', :project_id => 'foo'
|
||||
should_route 'PUT /projects/foo/versions/close_completed' => 'versions#close_completed', :project_id => 'foo'
|
||||
end
|
||||
|
||||
def test_versions
|
||||
should_route 'GET /versions/1' => 'versions#show', :id => '1'
|
||||
should_route 'GET /versions/1/edit' => 'versions#edit', :id => '1'
|
||||
should_route 'PUT /versions/1' => 'versions#update', :id => '1'
|
||||
should_route 'DELETE /versions/1' => 'versions#destroy', :id => '1'
|
||||
|
||||
should_route 'POST /versions/1/status_by' => 'versions#status_by', :id => '1'
|
||||
end
|
||||
end
|
31
test/integration/routing/watchers_test.rb
Normal file
31
test/integration/routing/watchers_test.rb
Normal file
|
@ -0,0 +1,31 @@
|
|||
# Redmine - project management software
|
||||
# Copyright (C) 2006-2017 Jean-Philippe Lang
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or
|
||||
# modify it under the terms of the GNU General Public License
|
||||
# as published by the Free Software Foundation; either version 2
|
||||
# of the License, or (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program; if not, write to the Free Software
|
||||
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||
|
||||
require File.expand_path('../../../test_helper', __FILE__)
|
||||
|
||||
class RoutingWatchersTest < Redmine::RoutingTest
|
||||
def test_watchers
|
||||
should_route 'GET /watchers/new' => 'watchers#new'
|
||||
should_route 'POST /watchers/append' => 'watchers#append'
|
||||
should_route 'POST /watchers' => 'watchers#create'
|
||||
should_route 'DELETE /watchers' => 'watchers#destroy'
|
||||
should_route 'GET /watchers/autocomplete_for_user' => 'watchers#autocomplete_for_user'
|
||||
|
||||
should_route 'POST /watchers/watch' => 'watchers#watch'
|
||||
should_route 'DELETE /watchers/watch' => 'watchers#unwatch'
|
||||
end
|
||||
end
|
25
test/integration/routing/welcome_test.rb
Normal file
25
test/integration/routing/welcome_test.rb
Normal file
|
@ -0,0 +1,25 @@
|
|||
# Redmine - project management software
|
||||
# Copyright (C) 2006-2017 Jean-Philippe Lang
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or
|
||||
# modify it under the terms of the GNU General Public License
|
||||
# as published by the Free Software Foundation; either version 2
|
||||
# of the License, or (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program; if not, write to the Free Software
|
||||
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||
|
||||
require File.expand_path('../../../test_helper', __FILE__)
|
||||
|
||||
class RoutingWelcomeTest < Redmine::RoutingTest
|
||||
def test_welcome
|
||||
should_route 'GET /' => 'welcome#index'
|
||||
should_route 'GET /robots.txt' => 'welcome#robots'
|
||||
end
|
||||
end
|
62
test/integration/routing/wiki_test.rb
Normal file
62
test/integration/routing/wiki_test.rb
Normal file
|
@ -0,0 +1,62 @@
|
|||
# Redmine - project management software
|
||||
# Copyright (C) 2006-2017 Jean-Philippe Lang
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or
|
||||
# modify it under the terms of the GNU General Public License
|
||||
# as published by the Free Software Foundation; either version 2
|
||||
# of the License, or (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program; if not, write to the Free Software
|
||||
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||
|
||||
require File.expand_path('../../../test_helper', __FILE__)
|
||||
|
||||
class RoutingWikiTest < Redmine::RoutingTest
|
||||
def test_wiki
|
||||
should_route 'GET /projects/foo/wiki' => 'wiki#show', :project_id => 'foo'
|
||||
should_route 'GET /projects/foo/wiki/index' => 'wiki#index', :project_id => 'foo'
|
||||
should_route 'GET /projects/foo/wiki/date_index' => 'wiki#date_index', :project_id => 'foo'
|
||||
should_route 'GET /projects/foo/wiki/export' => 'wiki#export', :project_id => 'foo'
|
||||
should_route 'GET /projects/foo/wiki/export.pdf' => 'wiki#export', :project_id => 'foo', :format => 'pdf'
|
||||
end
|
||||
|
||||
def test_wiki_pages
|
||||
should_route 'GET /projects/foo/wiki/page' => 'wiki#show', :project_id => 'foo', :id => 'page'
|
||||
should_route 'GET /projects/foo/wiki/page.pdf' => 'wiki#show', :project_id => 'foo', :id => 'page', :format => 'pdf'
|
||||
|
||||
should_route 'GET /projects/foo/wiki/new' => 'wiki#new', :project_id => 'foo'
|
||||
should_route 'POST /projects/foo/wiki/new' => 'wiki#new', :project_id => 'foo'
|
||||
|
||||
should_route 'GET /projects/foo/wiki/page/edit' => 'wiki#edit', :project_id => 'foo', :id => 'page'
|
||||
should_route 'PUT /projects/foo/wiki/page' => 'wiki#update', :project_id => 'foo', :id => 'page'
|
||||
should_route 'DELETE /projects/foo/wiki/page' => 'wiki#destroy', :project_id => 'foo', :id => 'page'
|
||||
|
||||
should_route 'GET /projects/foo/wiki/page/history' => 'wiki#history', :project_id => 'foo', :id => 'page'
|
||||
should_route 'GET /projects/foo/wiki/page/diff' => 'wiki#diff', :project_id => 'foo', :id => 'page'
|
||||
should_route 'GET /projects/foo/wiki/page/rename' => 'wiki#rename', :project_id => 'foo', :id => 'page'
|
||||
should_route 'POST /projects/foo/wiki/page/rename' => 'wiki#rename', :project_id => 'foo', :id => 'page'
|
||||
should_route 'POST /projects/foo/wiki/page/protect' => 'wiki#protect', :project_id => 'foo', :id => 'page'
|
||||
should_route 'POST /projects/foo/wiki/page/add_attachment' => 'wiki#add_attachment', :project_id => 'foo', :id => 'page'
|
||||
|
||||
should_route 'POST /projects/foo/wiki/page/preview' => 'wiki#preview', :project_id => 'foo', :id => 'page'
|
||||
should_route 'PUT /projects/foo/wiki/page/preview' => 'wiki#preview', :project_id => 'foo', :id => 'page'
|
||||
|
||||
# Make sure we don't route wiki page sub-uris to let plugins handle them
|
||||
assert_raise(Minitest::Assertion) do
|
||||
assert_recognizes({}, {:method => 'get', :path => "/projects/foo/wiki/page/whatever"})
|
||||
end
|
||||
end
|
||||
|
||||
def test_wiki_page_versions
|
||||
should_route 'GET /projects/foo/wiki/page/2' => 'wiki#show', :project_id => 'foo', :id => 'page', :version => '2'
|
||||
should_route 'GET /projects/foo/wiki/page/2/diff' => 'wiki#diff', :project_id => 'foo', :id => 'page', :version => '2'
|
||||
should_route 'GET /projects/foo/wiki/page/2/annotate' => 'wiki#annotate', :project_id => 'foo', :id => 'page', :version => '2'
|
||||
should_route 'DELETE /projects/foo/wiki/page/2' => 'wiki#destroy_version', :project_id => 'foo', :id => 'page', :version => '2'
|
||||
end
|
||||
end
|
27
test/integration/routing/wikis_test.rb
Normal file
27
test/integration/routing/wikis_test.rb
Normal file
|
@ -0,0 +1,27 @@
|
|||
# Redmine - project management software
|
||||
# Copyright (C) 2006-2017 Jean-Philippe Lang
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or
|
||||
# modify it under the terms of the GNU General Public License
|
||||
# as published by the Free Software Foundation; either version 2
|
||||
# of the License, or (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program; if not, write to the Free Software
|
||||
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||
|
||||
require File.expand_path('../../../test_helper', __FILE__)
|
||||
|
||||
class RoutingWikisTest < Redmine::RoutingTest
|
||||
def test_wikis
|
||||
should_route 'POST /projects/foo/wiki' => 'wikis#edit', :id => 'foo'
|
||||
|
||||
should_route 'GET /projects/foo/wiki/destroy' => 'wikis#destroy', :id => 'foo'
|
||||
should_route 'POST /projects/foo/wiki/destroy' => 'wikis#destroy', :id => 'foo'
|
||||
end
|
||||
end
|
32
test/integration/routing/workflows_test.rb
Normal file
32
test/integration/routing/workflows_test.rb
Normal file
|
@ -0,0 +1,32 @@
|
|||
# Redmine - project management software
|
||||
# Copyright (C) 2006-2017 Jean-Philippe Lang
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or
|
||||
# modify it under the terms of the GNU General Public License
|
||||
# as published by the Free Software Foundation; either version 2
|
||||
# of the License, or (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program; if not, write to the Free Software
|
||||
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||
|
||||
require File.expand_path('../../../test_helper', __FILE__)
|
||||
|
||||
class RoutingWorkflowsTest < Redmine::RoutingTest
|
||||
def test_workflows
|
||||
should_route 'GET /workflows' => 'workflows#index'
|
||||
should_route 'GET /workflows/edit' => 'workflows#edit'
|
||||
should_route 'POST /workflows/edit' => 'workflows#edit'
|
||||
|
||||
should_route 'GET /workflows/permissions' => 'workflows#permissions'
|
||||
should_route 'POST /workflows/permissions' => 'workflows#permissions'
|
||||
|
||||
should_route 'GET /workflows/copy' => 'workflows#copy'
|
||||
should_route 'POST /workflows/copy' => 'workflows#copy'
|
||||
end
|
||||
end
|
Loading…
Add table
Add a link
Reference in a new issue