From 5977d1be20c831ed25d65698c9c5657e8021c7ad Mon Sep 17 00:00:00 2001 From: Toshi MARUYAMA Date: Tue, 24 May 2011 01:47:26 +0000 Subject: [PATCH] scm: bazaar: code clean up functional test. git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@5883 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- test/functional/repositories_bazaar_controller_test.rb | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/test/functional/repositories_bazaar_controller_test.rb b/test/functional/repositories_bazaar_controller_test.rb index f7dfbfe18..75fddab97 100644 --- a/test/functional/repositories_bazaar_controller_test.rb +++ b/test/functional/repositories_bazaar_controller_test.rb @@ -22,7 +22,8 @@ require 'repositories_controller' class RepositoriesController; def rescue_action(e) raise e end; end class RepositoriesBazaarControllerTest < ActionController::TestCase - fixtures :projects, :users, :roles, :members, :member_roles, :repositories, :enabled_modules + fixtures :projects, :users, :roles, :members, :member_roles, + :repositories, :enabled_modules # No '..' in the repository path REPOSITORY_PATH = RAILS_ROOT.gsub(%r{config\/\.\.}, '') + '/tmp/test/bazaar_repository' @@ -35,7 +36,8 @@ class RepositoriesBazaarControllerTest < ActionController::TestCase User.current = nil @project = Project.find(PRJ_ID) @repository = Repository::Bazaar.create( - :project => @project, :url => REPOSITORY_PATH, + :project => @project, + :url => REPOSITORY_PATH, :log_encoding => 'UTF-8') assert @repository end @@ -76,7 +78,8 @@ class RepositoriesBazaarControllerTest < ActionController::TestCase assert_response :success assert_template 'show' assert_not_nil assigns(:entries) - assert_equal ['directory', 'doc-deleted.txt', 'doc-ls.txt', 'doc-mkdir.txt'], assigns(:entries).collect(&:name) + assert_equal ['directory', 'doc-deleted.txt', 'doc-ls.txt', 'doc-mkdir.txt'], + assigns(:entries).collect(&:name) end def test_changes