diff --git a/test/functional/repositories_cvs_controller_test.rb b/test/functional/repositories_cvs_controller_test.rb index 6a6be3883..402ee8cfe 100644 --- a/test/functional/repositories_cvs_controller_test.rb +++ b/test/functional/repositories_cvs_controller_test.rb @@ -39,13 +39,13 @@ class RepositoriesCvsControllerTest < ActionController::TestCase User.current = nil @project = Project.find(PRJ_ID) - @repository = Repository::Cvs.create(:project => Project.find(PRJ_ID), - :root_url => REPOSITORY_PATH, - :url => MODULE_NAME, + @repository = Repository::Cvs.create(:project => Project.find(PRJ_ID), + :root_url => REPOSITORY_PATH, + :url => MODULE_NAME, :log_encoding => 'UTF-8') assert @repository end - + if File.directory?(REPOSITORY_PATH) def test_show @repository.fetch_changesets @@ -56,7 +56,7 @@ class RepositoriesCvsControllerTest < ActionController::TestCase assert_not_nil assigns(:entries) assert_not_nil assigns(:changesets) end - + def test_browse_root @repository.fetch_changesets @repository.reload @@ -65,14 +65,14 @@ class RepositoriesCvsControllerTest < ActionController::TestCase assert_template 'show' assert_not_nil assigns(:entries) assert_equal 3, assigns(:entries).size - + entry = assigns(:entries).detect {|e| e.name == 'images'} assert_equal 'dir', entry.kind entry = assigns(:entries).detect {|e| e.name == 'README'} assert_equal 'file', entry.kind end - + def test_browse_directory @repository.fetch_changesets @repository.reload @@ -86,7 +86,7 @@ class RepositoriesCvsControllerTest < ActionController::TestCase assert_equal 'file', entry.kind assert_equal 'images/edit.png', entry.path end - + def test_browse_at_given_revision @repository.fetch_changesets @repository.reload @@ -96,7 +96,7 @@ class RepositoriesCvsControllerTest < ActionController::TestCase assert_not_nil assigns(:entries) assert_equal ['delete.png', 'edit.png'], assigns(:entries).collect(&:name) end - + def test_entry @repository.fetch_changesets @repository.reload @@ -106,7 +106,7 @@ class RepositoriesCvsControllerTest < ActionController::TestCase assert_no_tag :tag => 'td', :attributes => { :class => /line-code/}, :content => /before_filter/ end - + def test_entry_at_given_revision # changesets must be loaded @repository.fetch_changesets @@ -118,7 +118,7 @@ class RepositoriesCvsControllerTest < ActionController::TestCase assert_tag :tag => 'td', :attributes => { :class => /line-code/}, :content => /before_filter/ end - + def test_entry_not_found @repository.fetch_changesets @repository.reload @@ -126,7 +126,7 @@ class RepositoriesCvsControllerTest < ActionController::TestCase assert_tag :tag => 'p', :attributes => { :id => /errorExplanation/ }, :content => /The entry or revision was not found in the repository/ end - + def test_entry_download @repository.fetch_changesets @repository.reload @@ -143,7 +143,7 @@ class RepositoriesCvsControllerTest < ActionController::TestCase assert_not_nil assigns(:entry) assert_equal 'sources', assigns(:entry).name end - + def test_diff @repository.fetch_changesets @repository.reload @@ -155,7 +155,7 @@ class RepositoriesCvsControllerTest < ActionController::TestCase assert_tag :tag => 'td', :attributes => { :class => 'line-code diff_in' }, :content => /watched.remove_all_watcher/ end - + def test_diff_new_files @repository.fetch_changesets @repository.reload @@ -171,7 +171,7 @@ class RepositoriesCvsControllerTest < ActionController::TestCase assert_tag :tag => 'th', :attributes => { :class => 'filename' }, :content => /test\/images\/edit.png/ assert_tag :tag => 'th', :attributes => { :class => 'filename' }, - :content => /test\/sources\/watchers_controller.rb/ + :content => /test\/sources\/watchers_controller.rb/ end def test_annotate