diff options
author | Toshi MARUYAMA <marutosijp2@yahoo.co.jp> | 2011-11-20 06:13:48 +0000 |
---|---|---|
committer | Toshi MARUYAMA <marutosijp2@yahoo.co.jp> | 2011-11-20 06:13:48 +0000 |
commit | 00f9581380ea35c4e2e29fab61b84e7fd39a2d97 (patch) | |
tree | 6140e918c251f0bf3451661b4d353fc770cde7f8 | |
parent | 245b534c83abb79ed21b9a2b72f8c4cd0cad1470 (diff) | |
download | redmine-00f9581380ea35c4e2e29fab61b84e7fd39a2d97.tar.gz redmine-00f9581380ea35c4e2e29fab61b84e7fd39a2d97.zip |
attachment: update functional tests to switch "side by side" and "inline" for patches (#9612)
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@7861 e93f8b46-1217-0410-a6f0-8f06a7374b81
-rw-r--r-- | test/functional/attachments_controller_test.rb | 48 |
1 files changed, 26 insertions, 22 deletions
diff --git a/test/functional/attachments_controller_test.rb b/test/functional/attachments_controller_test.rb index f6ed040b5..5855bf638 100644 --- a/test/functional/attachments_controller_test.rb +++ b/test/functional/attachments_controller_test.rb @@ -37,31 +37,35 @@ class AttachmentsControllerTest < ActionController::TestCase end def test_show_diff - get :show, :id => 14 # 060719210727_changeset_utf8.diff - assert_response :success - assert_template 'diff' - assert_equal 'text/html', @response.content_type - - assert_tag 'th', - :attributes => {:class => /filename/}, - :content => /issues_controller.rb\t\(révision 1484\)/ - assert_tag 'td', - :attributes => {:class => /line-code/}, - :content => /Demande créée avec succès/ + ['inline', 'sbs'].each do |dt| + # 060719210727_changeset_utf8.diff + get :show, :id => 14, :type => dt + assert_response :success + assert_template 'diff' + assert_equal 'text/html', @response.content_type + assert_tag 'th', + :attributes => {:class => /filename/}, + :content => /issues_controller.rb\t\(révision 1484\)/ + assert_tag 'td', + :attributes => {:class => /line-code/}, + :content => /Demande créée avec succès/ + end end def test_show_diff_should_strip_non_utf8_content - get :show, :id => 5 # 060719210727_changeset_iso8859-1.diff - assert_response :success - assert_template 'diff' - assert_equal 'text/html', @response.content_type - - assert_tag 'th', - :attributes => {:class => /filename/}, - :content => /issues_controller.rb\t\(rvision 1484\)/ - assert_tag 'td', - :attributes => {:class => /line-code/}, - :content => /Demande cre avec succs/ + ['inline', 'sbs'].each do |dt| + # 060719210727_changeset_iso8859-1.diff + get :show, :id => 5, :type => dt + assert_response :success + assert_template 'diff' + assert_equal 'text/html', @response.content_type + assert_tag 'th', + :attributes => {:class => /filename/}, + :content => /issues_controller.rb\t\(rvision 1484\)/ + assert_tag 'td', + :attributes => {:class => /line-code/}, + :content => /Demande cre avec succs/ + end end def test_show_text_file |