scm: bazaar: code clean up functional test.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@5883 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
parent
29b2db0891
commit
5977d1be20
|
@ -22,7 +22,8 @@ require 'repositories_controller'
|
||||||
class RepositoriesController; def rescue_action(e) raise e end; end
|
class RepositoriesController; def rescue_action(e) raise e end; end
|
||||||
|
|
||||||
class RepositoriesBazaarControllerTest < ActionController::TestCase
|
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
|
# No '..' in the repository path
|
||||||
REPOSITORY_PATH = RAILS_ROOT.gsub(%r{config\/\.\.}, '') + '/tmp/test/bazaar_repository'
|
REPOSITORY_PATH = RAILS_ROOT.gsub(%r{config\/\.\.}, '') + '/tmp/test/bazaar_repository'
|
||||||
|
@ -35,7 +36,8 @@ class RepositoriesBazaarControllerTest < ActionController::TestCase
|
||||||
User.current = nil
|
User.current = nil
|
||||||
@project = Project.find(PRJ_ID)
|
@project = Project.find(PRJ_ID)
|
||||||
@repository = Repository::Bazaar.create(
|
@repository = Repository::Bazaar.create(
|
||||||
:project => @project, :url => REPOSITORY_PATH,
|
:project => @project,
|
||||||
|
:url => REPOSITORY_PATH,
|
||||||
:log_encoding => 'UTF-8')
|
:log_encoding => 'UTF-8')
|
||||||
assert @repository
|
assert @repository
|
||||||
end
|
end
|
||||||
|
@ -76,7 +78,8 @@ class RepositoriesBazaarControllerTest < ActionController::TestCase
|
||||||
assert_response :success
|
assert_response :success
|
||||||
assert_template 'show'
|
assert_template 'show'
|
||||||
assert_not_nil assigns(:entries)
|
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
|
end
|
||||||
|
|
||||||
def test_changes
|
def test_changes
|
||||||
|
|
Loading…
Reference in New Issue