Tests fixes.
git-svn-id: http://redmine.rubyforge.org/svn/branches/work@1472 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
@@ -38,7 +38,7 @@ class ProjectsControllerTest < Test::Unit::TestCase
|
|||||||
assert_template 'index'
|
assert_template 'index'
|
||||||
assert_not_nil assigns(:project_tree)
|
assert_not_nil assigns(:project_tree)
|
||||||
# Root project as hash key
|
# 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
|
# Subproject in corresponding value
|
||||||
assert assigns(:project_tree)[Project.find(1)].include?(Project.find(3))
|
assert assigns(:project_tree)[Project.find(1)].include?(Project.find(3))
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -3,8 +3,11 @@ require "#{File.dirname(__FILE__)}/../test_helper"
|
|||||||
class IssuesTest < ActionController::IntegrationTest
|
class IssuesTest < ActionController::IntegrationTest
|
||||||
fixtures :projects,
|
fixtures :projects,
|
||||||
:users,
|
:users,
|
||||||
|
:roles,
|
||||||
|
:members,
|
||||||
:trackers,
|
:trackers,
|
||||||
:projects_trackers,
|
:projects_trackers,
|
||||||
|
:enabled_modules,
|
||||||
:issue_statuses,
|
:issue_statuses,
|
||||||
:issues,
|
:issues,
|
||||||
:enumerations,
|
:enumerations,
|
||||||
|
|||||||
@@ -58,20 +58,3 @@ class Test::Unit::TestCase
|
|||||||
ActionController::TestUploadedFile.new(Test::Unit::TestCase.fixture_path + "/files/#{name}", mime)
|
ActionController::TestUploadedFile.new(Test::Unit::TestCase.fixture_path + "/files/#{name}", mime)
|
||||||
end
|
end
|
||||||
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
|
|
||||||
|
|||||||
Reference in New Issue
Block a user