From 606ca39d101c559e1add4de23447c6c9132e0be6 Mon Sep 17 00:00:00 2001 From: Jean-Philippe Lang Date: Mon, 2 Jan 2012 19:44:37 +0000 Subject: [PATCH] Test cleanup. git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@8475 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- test/integration/api_test/attachments_test.rb | 4 ---- test/integration/api_test/issue_categories_test.rb | 4 ---- test/integration/api_test/issue_relations_test.rb | 4 ---- test/integration/api_test/issues_test.rb | 4 ---- test/integration/api_test/news_test.rb | 4 ---- test/integration/api_test/projects_test.rb | 4 ---- test/integration/api_test/queries_test.rb | 4 ---- test/integration/api_test/time_entries_test.rb | 4 ---- test/integration/api_test/users_test.rb | 4 ---- test/integration/api_test/versions_test.rb | 4 ---- test/test_helper.rb | 4 ++++ 11 files changed, 4 insertions(+), 40 deletions(-) diff --git a/test/integration/api_test/attachments_test.rb b/test/integration/api_test/attachments_test.rb index 73ded9b30..9beb8b09a 100644 --- a/test/integration/api_test/attachments_test.rb +++ b/test/integration/api_test/attachments_test.rb @@ -83,8 +83,4 @@ class ApiTest::AttachmentsTest < ActionController::IntegrationTest end end end - - def credentials(user, password=nil) - ActionController::HttpAuthentication::Basic.encode_credentials(user, password || user) - end end diff --git a/test/integration/api_test/issue_categories_test.rb b/test/integration/api_test/issue_categories_test.rb index df5967a34..af20a80ae 100644 --- a/test/integration/api_test/issue_categories_test.rb +++ b/test/integration/api_test/issue_categories_test.rb @@ -120,8 +120,4 @@ class ApiTest::IssueCategoriesTest < ActionController::IntegrationTest assert_nil IssueCategory.find_by_id(1) end end - - def credentials(user, password=nil) - ActionController::HttpAuthentication::Basic.encode_credentials(user, password || user) - end end diff --git a/test/integration/api_test/issue_relations_test.rb b/test/integration/api_test/issue_relations_test.rb index b73b98d24..01dbe3da9 100644 --- a/test/integration/api_test/issue_relations_test.rb +++ b/test/integration/api_test/issue_relations_test.rb @@ -103,8 +103,4 @@ class ApiTest::IssueRelationsTest < ActionController::IntegrationTest end end end - - def credentials(user, password=nil) - ActionController::HttpAuthentication::Basic.encode_credentials(user, password || user) - end end diff --git a/test/integration/api_test/issues_test.rb b/test/integration/api_test/issues_test.rb index 3a9c333bf..1b8a2d80f 100644 --- a/test/integration/api_test/issues_test.rb +++ b/test/integration/api_test/issues_test.rb @@ -576,8 +576,4 @@ class ApiTest::IssuesTest < ActionController::IntegrationTest assert_nil Issue.find_by_id(6) end end - - def credentials(user, password=nil) - ActionController::HttpAuthentication::Basic.encode_credentials(user, password || user) - end end diff --git a/test/integration/api_test/news_test.rb b/test/integration/api_test/news_test.rb index 13b27917d..a32ada947 100644 --- a/test/integration/api_test/news_test.rb +++ b/test/integration/api_test/news_test.rb @@ -95,8 +95,4 @@ class ApiTest::NewsTest < ActionController::IntegrationTest end end end - - def credentials(user, password=nil) - ActionController::HttpAuthentication::Basic.encode_credentials(user, password || user) - end end diff --git a/test/integration/api_test/projects_test.rb b/test/integration/api_test/projects_test.rb index 729333bed..beef58e47 100644 --- a/test/integration/api_test/projects_test.rb +++ b/test/integration/api_test/projects_test.rb @@ -290,8 +290,4 @@ class ApiTest::ProjectsTest < ActionController::IntegrationTest end end end - - def credentials(user, password=nil) - ActionController::HttpAuthentication::Basic.encode_credentials(user, password || user) - end end diff --git a/test/integration/api_test/queries_test.rb b/test/integration/api_test/queries_test.rb index 915ca26fd..5b55342f7 100644 --- a/test/integration/api_test/queries_test.rb +++ b/test/integration/api_test/queries_test.rb @@ -56,8 +56,4 @@ class ApiTest::QueriesTest < ActionController::IntegrationTest end end end - - def credentials(user, password=nil) - ActionController::HttpAuthentication::Basic.encode_credentials(user, password || user) - end end diff --git a/test/integration/api_test/time_entries_test.rb b/test/integration/api_test/time_entries_test.rb index fd63cce4d..1cfa02088 100644 --- a/test/integration/api_test/time_entries_test.rb +++ b/test/integration/api_test/time_entries_test.rb @@ -145,8 +145,4 @@ class ApiTest::TimeEntriesTest < ActionController::IntegrationTest assert_nil TimeEntry.find_by_id(2) end end - - def credentials(user, password=nil) - ActionController::HttpAuthentication::Basic.encode_credentials(user, password || user) - end end diff --git a/test/integration/api_test/users_test.rb b/test/integration/api_test/users_test.rb index d5c15c128..ab301fe18 100644 --- a/test/integration/api_test/users_test.rb +++ b/test/integration/api_test/users_test.rb @@ -312,8 +312,4 @@ class ApiTest::UsersTest < ActionController::IntegrationTest end end end - - def credentials(user, password=nil) - ActionController::HttpAuthentication::Basic.encode_credentials(user, password || user) - end end diff --git a/test/integration/api_test/versions_test.rb b/test/integration/api_test/versions_test.rb index f325d2c25..34416b68c 100644 --- a/test/integration/api_test/versions_test.rb +++ b/test/integration/api_test/versions_test.rb @@ -121,8 +121,4 @@ class ApiTest::VersionsTest < ActionController::IntegrationTest end end end - - def credentials(user, password=nil) - ActionController::HttpAuthentication::Basic.encode_credentials(user, password || user) - end end diff --git a/test/test_helper.rb b/test/test_helper.rb index 2fa726ad5..c0947efc3 100644 --- a/test/test_helper.rb +++ b/test/test_helper.rb @@ -62,6 +62,10 @@ class ActiveSupport::TestCase ActiveSupport::TestCase.fixture_path + "/files/#{name}", mime, true) end + def credentials(user, password=nil) + ActionController::HttpAuthentication::Basic.encode_credentials(user, password || user) + end + # Mock out a file def self.mock_file file = 'a_file.png' -- 2.39.5