summaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorJean-Philippe Lang <jp_lang@yahoo.fr>2008-07-04 17:58:14 +0000
committerJean-Philippe Lang <jp_lang@yahoo.fr>2008-07-04 17:58:14 +0000
commit7cdd88a6ce3632c801223b33e5ccc2b9fc13651e (patch)
treea270478d7d7626ac9970d69e32cac6c6807e6cf4 /test
parent22558f77094dce4d489dac410abd7b74e48cdcb0 (diff)
downloadredmine-7cdd88a6ce3632c801223b33e5ccc2b9fc13651e.tar.gz
redmine-7cdd88a6ce3632c801223b33e5ccc2b9fc13651e.zip
Merged Rails 2.1 compatibility branch.
git-svn-id: http://redmine.rubyforge.org/svn/trunk@1623 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'test')
-rw-r--r--test/functional/projects_controller_test.rb2
-rw-r--r--test/integration/issues_test.rb3
-rw-r--r--test/test_helper.rb17
-rw-r--r--test/unit/role_test.rb2
-rw-r--r--test/unit/tracker_test.rb2
5 files changed, 6 insertions, 20 deletions
diff --git a/test/functional/projects_controller_test.rb b/test/functional/projects_controller_test.rb
index 88c0319ba..88a9fae60 100644
--- a/test/functional/projects_controller_test.rb
+++ b/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/test/integration/issues_test.rb b/test/integration/issues_test.rb
index 1b57ba8f8..2ef933fc2 100644
--- a/test/integration/issues_test.rb
+++ b/test/integration/issues_test.rb
@@ -20,8 +20,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/test/test_helper.rb b/test/test_helper.rb
index 1340f9c35..f61b88d8c 100644
--- a/test/test_helper.rb
+++ b/test/test_helper.rb
@@ -65,20 +65,3 @@ class Test::Unit::TestCase
Attachment.storage_path = "#{RAILS_ROOT}/tmp/test/attachments"
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
diff --git a/test/unit/role_test.rb b/test/unit/role_test.rb
index 5e0d16753..b98af2e36 100644
--- a/test/unit/role_test.rb
+++ b/test/unit/role_test.rb
@@ -26,7 +26,7 @@ class RoleTest < Test::Unit::TestCase
target = Role.new(:name => 'Target')
assert target.save
- assert target.workflows.copy(source)
+ target.workflows.copy(source)
target.reload
assert_equal 90, target.workflows.size
end
diff --git a/test/unit/tracker_test.rb b/test/unit/tracker_test.rb
index 406bdd6db..6dab8890c 100644
--- a/test/unit/tracker_test.rb
+++ b/test/unit/tracker_test.rb
@@ -26,7 +26,7 @@ class TrackerTest < Test::Unit::TestCase
target = Tracker.new(:name => 'Target')
assert target.save
- assert target.workflows.copy(source)
+ target.workflows.copy(source)
target.reload
assert_equal 89, target.workflows.size
end