From d5fde17bf5d0b8788871f60ff08b203da527de92 Mon Sep 17 00:00:00 2001 From: Eric Davis Date: Mon, 1 Nov 2010 15:26:05 +0000 Subject: [PATCH] Move all API tests into the ApiTest module to make management easier git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@4357 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- test/integration/{ => api_test}/disabled_rest_api_test.rb | 4 ++-- test/integration/{ => api_test}/http_basic_login_test.rb | 4 ++-- .../{ => api_test}/http_basic_login_with_api_token_test.rb | 4 ++-- .../{issues_api_test.rb => api_test/issues_test.rb} | 4 ++-- .../{projects_api_test.rb => api_test/projects_test.rb} | 4 ++-- .../token_authentication_test.rb} | 4 ++-- test/test_helper.rb | 4 ++++ 7 files changed, 16 insertions(+), 12 deletions(-) rename test/integration/{ => api_test}/disabled_rest_api_test.rb (96%) rename test/integration/{ => api_test}/http_basic_login_test.rb (96%) rename test/integration/{ => api_test}/http_basic_login_with_api_token_test.rb (95%) rename test/integration/{issues_api_test.rb => api_test/issues_test.rb} (98%) rename test/integration/{projects_api_test.rb => api_test/projects_test.rb} (96%) rename test/integration/{api_token_login_test.rb => api_test/token_authentication_test.rb} (94%) diff --git a/test/integration/disabled_rest_api_test.rb b/test/integration/api_test/disabled_rest_api_test.rb similarity index 96% rename from test/integration/disabled_rest_api_test.rb rename to test/integration/api_test/disabled_rest_api_test.rb index 5ebf91c3f..d94d14b6e 100644 --- a/test/integration/disabled_rest_api_test.rb +++ b/test/integration/api_test/disabled_rest_api_test.rb @@ -1,6 +1,6 @@ -require "#{File.dirname(__FILE__)}/../test_helper" +require "#{File.dirname(__FILE__)}/../../test_helper" -class DisabledRestApi < ActionController::IntegrationTest +class ApiTest::DisabledRestApiTest < ActionController::IntegrationTest fixtures :all def setup diff --git a/test/integration/http_basic_login_test.rb b/test/integration/api_test/http_basic_login_test.rb similarity index 96% rename from test/integration/http_basic_login_test.rb rename to test/integration/api_test/http_basic_login_test.rb index 9ec69a8c9..aa879f64a 100644 --- a/test/integration/http_basic_login_test.rb +++ b/test/integration/api_test/http_basic_login_test.rb @@ -1,6 +1,6 @@ -require "#{File.dirname(__FILE__)}/../test_helper" +require "#{File.dirname(__FILE__)}/../../test_helper" -class HttpBasicLoginTest < ActionController::IntegrationTest +class ApiTest::HttpBasicLoginTest < ActionController::IntegrationTest fixtures :all def setup diff --git a/test/integration/http_basic_login_with_api_token_test.rb b/test/integration/api_test/http_basic_login_with_api_token_test.rb similarity index 95% rename from test/integration/http_basic_login_with_api_token_test.rb rename to test/integration/api_test/http_basic_login_with_api_token_test.rb index fe3df3130..0d0d5bd0c 100644 --- a/test/integration/http_basic_login_with_api_token_test.rb +++ b/test/integration/api_test/http_basic_login_with_api_token_test.rb @@ -1,6 +1,6 @@ -require "#{File.dirname(__FILE__)}/../test_helper" +require "#{File.dirname(__FILE__)}/../../test_helper" -class HttpBasicLoginWithApiTokenTest < ActionController::IntegrationTest +class ApiTest::HttpBasicLoginWithApiTokenTest < ActionController::IntegrationTest fixtures :all def setup diff --git a/test/integration/issues_api_test.rb b/test/integration/api_test/issues_test.rb similarity index 98% rename from test/integration/issues_api_test.rb rename to test/integration/api_test/issues_test.rb index e26cf643b..c51438bba 100644 --- a/test/integration/issues_api_test.rb +++ b/test/integration/api_test/issues_test.rb @@ -15,9 +15,9 @@ # 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.dirname(__FILE__)}/../test_helper" +require "#{File.dirname(__FILE__)}/../../test_helper" -class IssuesApiTest < ActionController::IntegrationTest +class ApiTest::IssuesTest < ActionController::IntegrationTest fixtures :projects, :users, :roles, diff --git a/test/integration/projects_api_test.rb b/test/integration/api_test/projects_test.rb similarity index 96% rename from test/integration/projects_api_test.rb rename to test/integration/api_test/projects_test.rb index e254c5137..7c090a925 100644 --- a/test/integration/projects_api_test.rb +++ b/test/integration/api_test/projects_test.rb @@ -15,9 +15,9 @@ # 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.dirname(__FILE__)}/../test_helper" +require "#{File.dirname(__FILE__)}/../../test_helper" -class ProjectsApiTest < ActionController::IntegrationTest +class ApiTest::ProjectsTest < ActionController::IntegrationTest fixtures :projects, :versions, :users, :roles, :members, :member_roles, :issues, :journals, :journal_details, :trackers, :projects_trackers, :issue_statuses, :enabled_modules, :enumerations, :boards, :messages, :attachments, :custom_fields, :custom_values, :time_entries diff --git a/test/integration/api_token_login_test.rb b/test/integration/api_test/token_authentication_test.rb similarity index 94% rename from test/integration/api_token_login_test.rb rename to test/integration/api_test/token_authentication_test.rb index 43f6eb01f..7d6cb2e1d 100644 --- a/test/integration/api_token_login_test.rb +++ b/test/integration/api_test/token_authentication_test.rb @@ -1,6 +1,6 @@ -require "#{File.dirname(__FILE__)}/../test_helper" +require "#{File.dirname(__FILE__)}/../../test_helper" -class ApiTokenLoginTest < ActionController::IntegrationTest +class ApiTest::TokenAuthenticationTest < ActionController::IntegrationTest fixtures :all def setup diff --git a/test/test_helper.rb b/test/test_helper.rb index eea1a03b5..db44bb9b8 100644 --- a/test/test_helper.rb +++ b/test/test_helper.rb @@ -186,3 +186,7 @@ class ActiveSupport::TestCase end end end + +# Simple module to "namespace" all of the API tests +module ApiTest +end -- 2.39.5