From d4ab8fbd17dc54bd75e4b8065cbab2ef9b3bcf22 Mon Sep 17 00:00:00 2001 From: Jean-Philippe Lang Date: Tue, 27 May 2008 19:26:11 +0000 Subject: [PATCH] Tests fixes. git-svn-id: http://redmine.rubyforge.org/svn/branches/work@1472 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- .../test/functional/projects_controller_test.rb | 2 +- rails-2.1/test/integration/issues_test.rb | 3 +++ rails-2.1/test/test_helper.rb | 17 ----------------- 3 files changed, 4 insertions(+), 18 deletions(-) diff --git a/rails-2.1/test/functional/projects_controller_test.rb b/rails-2.1/test/functional/projects_controller_test.rb index d4ce97dc2..1115ce710 100644 --- a/rails-2.1/test/functional/projects_controller_test.rb +++ b/rails-2.1/test/functional/projects_controller_test.rb @@ -38,7 +38,7 @@ class ProjectsControllerTest < Test::Unit::TestCase assert_template 'index' assert_not_nil assigns(:project_tree) # Root project as hash key - assert assigns(:project_tree).has_key?(Project.find(1)) + assert assigns(:project_tree).keys.include?(Project.find(1)) # Subproject in corresponding value assert assigns(:project_tree)[Project.find(1)].include?(Project.find(3)) end diff --git a/rails-2.1/test/integration/issues_test.rb b/rails-2.1/test/integration/issues_test.rb index b9e21719c..8f28dd8cc 100644 --- a/rails-2.1/test/integration/issues_test.rb +++ b/rails-2.1/test/integration/issues_test.rb @@ -3,8 +3,11 @@ require "#{File.dirname(__FILE__)}/../test_helper" class IssuesTest < ActionController::IntegrationTest fixtures :projects, :users, + :roles, + :members, :trackers, :projects_trackers, + :enabled_modules, :issue_statuses, :issues, :enumerations, diff --git a/rails-2.1/test/test_helper.rb b/rails-2.1/test/test_helper.rb index 61670318a..980836f72 100644 --- a/rails-2.1/test/test_helper.rb +++ b/rails-2.1/test/test_helper.rb @@ -58,20 +58,3 @@ class Test::Unit::TestCase ActionController::TestUploadedFile.new(Test::Unit::TestCase.fixture_path + "/files/#{name}", mime) end end - - -# ActionController::TestUploadedFile bug -# see http://dev.rubyonrails.org/ticket/4635 -class String - def original_filename - "testfile.txt" - end - - def content_type - "text/plain" - end - - def read - self.to_s - end -end