summaryrefslogtreecommitdiffstats
path: root/test/functional/repositories_filesystem_controller_test.rb
diff options
context:
space:
mode:
authorJean-Philippe Lang <jp_lang@yahoo.fr>2016-07-21 17:48:05 +0000
committerJean-Philippe Lang <jp_lang@yahoo.fr>2016-07-21 17:48:05 +0000
commit00f709ad4d5fd0bfd77457b4bbb020c6302daa18 (patch)
tree18ef25654938d4f569c37101d0f89a16c999f845 /test/functional/repositories_filesystem_controller_test.rb
parent29ddc82a11f30f7fcb917dd062fc38f48640b4ea (diff)
downloadredmine-00f709ad4d5fd0bfd77457b4bbb020c6302daa18.tar.gz
redmine-00f709ad4d5fd0bfd77457b4bbb020c6302daa18.zip
Removes calls to #assert_template and #assigns in functional tests.
git-svn-id: http://svn.redmine.org/redmine/trunk@15725 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'test/functional/repositories_filesystem_controller_test.rb')
-rw-r--r--test/functional/repositories_filesystem_controller_test.rb22
1 files changed, 12 insertions, 10 deletions
diff --git a/test/functional/repositories_filesystem_controller_test.rb b/test/functional/repositories_filesystem_controller_test.rb
index c64429fb2..1e25bb824 100644
--- a/test/functional/repositories_filesystem_controller_test.rb
+++ b/test/functional/repositories_filesystem_controller_test.rb
@@ -45,9 +45,9 @@ class RepositoriesFilesystemControllerTest < Redmine::ControllerTest
@project.repository.destroy
get :new, :project_id => 'subproject1', :repository_scm => 'Filesystem'
assert_response :success
- assert_template 'new'
- assert_kind_of Repository::Filesystem, assigns(:repository)
- assert assigns(:repository).new_record?
+ assert_select 'select[name=?]', 'repository_scm' do
+ assert_select 'option[value=?][selected=selected]', 'Filesystem'
+ end
end
def test_browse_root
@@ -55,11 +55,15 @@ class RepositoriesFilesystemControllerTest < Redmine::ControllerTest
@repository.reload
get :show, :id => PRJ_ID
assert_response :success
- assert_template 'show'
- assert_not_nil assigns(:entries)
- assert assigns(:entries).size > 0
- assert_not_nil assigns(:changesets)
- assert assigns(:changesets).size == 0
+
+ assert_select 'table.entries tbody' do
+ assert_select 'tr', 3
+ assert_select 'tr.dir td.filename a', :text => 'dir'
+ assert_select 'tr.dir td.filename a', :text => 'japanese'
+ assert_select 'tr.file td.filename a', :text => 'test'
+ end
+
+ assert_select 'table.changesets tbody', 0
assert_select 'input[name=rev]', 0
assert_select 'a', :text => 'Statistics', :count => 0
@@ -69,7 +73,6 @@ class RepositoriesFilesystemControllerTest < Redmine::ControllerTest
def test_show_no_extension
get :entry, :id => PRJ_ID, :path => repository_path_hash(['test'])[:param]
assert_response :success
- assert_template 'entry'
assert_select 'tr#L1 td.line-code', :text => /TEST CAT/
end
@@ -84,7 +87,6 @@ class RepositoriesFilesystemControllerTest < Redmine::ControllerTest
get :entry, :id => PRJ_ID,
:path => repository_path_hash(['japanese', 'euc-jp.txt'])[:param]
assert_response :success
- assert_template 'entry'
assert_select 'tr#L2 td.line-code', :text => /japanese/
if @ruby19_non_utf8_pass
puts "TODO: show repository file contents test fails " +