@@ -37,31 +37,35 class AttachmentsControllerTest < ActionController::TestCase | |||
|
37 | 37 | end |
|
38 | 38 | |
|
39 | 39 | def test_show_diff |
|
40 | get :show, :id => 14 # 060719210727_changeset_utf8.diff | |
|
41 | assert_response :success | |
|
42 | assert_template 'diff' | |
|
43 | assert_equal 'text/html', @response.content_type | |
|
44 | ||
|
45 | assert_tag 'th', | |
|
46 | :attributes => {:class => /filename/}, | |
|
47 | :content => /issues_controller.rb\t\(révision 1484\)/ | |
|
48 | assert_tag 'td', | |
|
49 | :attributes => {:class => /line-code/}, | |
|
50 | :content => /Demande créée avec succès/ | |
|
40 | ['inline', 'sbs'].each do |dt| | |
|
41 | # 060719210727_changeset_utf8.diff | |
|
42 | get :show, :id => 14, :type => dt | |
|
43 | assert_response :success | |
|
44 | assert_template 'diff' | |
|
45 | assert_equal 'text/html', @response.content_type | |
|
46 | assert_tag 'th', | |
|
47 | :attributes => {:class => /filename/}, | |
|
48 | :content => /issues_controller.rb\t\(révision 1484\)/ | |
|
49 | assert_tag 'td', | |
|
50 | :attributes => {:class => /line-code/}, | |
|
51 | :content => /Demande créée avec succès/ | |
|
52 | end | |
|
51 | 53 | end |
|
52 | 54 | |
|
53 | 55 | def test_show_diff_should_strip_non_utf8_content |
|
54 | get :show, :id => 5 # 060719210727_changeset_iso8859-1.diff | |
|
55 | assert_response :success | |
|
56 | assert_template 'diff' | |
|
57 | assert_equal 'text/html', @response.content_type | |
|
58 | ||
|
59 | assert_tag 'th', | |
|
60 | :attributes => {:class => /filename/}, | |
|
61 | :content => /issues_controller.rb\t\(rvision 1484\)/ | |
|
62 | assert_tag 'td', | |
|
63 | :attributes => {:class => /line-code/}, | |
|
64 | :content => /Demande cre avec succs/ | |
|
56 | ['inline', 'sbs'].each do |dt| | |
|
57 | # 060719210727_changeset_iso8859-1.diff | |
|
58 | get :show, :id => 5, :type => dt | |
|
59 | assert_response :success | |
|
60 | assert_template 'diff' | |
|
61 | assert_equal 'text/html', @response.content_type | |
|
62 | assert_tag 'th', | |
|
63 | :attributes => {:class => /filename/}, | |
|
64 | :content => /issues_controller.rb\t\(rvision 1484\)/ | |
|
65 | assert_tag 'td', | |
|
66 | :attributes => {:class => /line-code/}, | |
|
67 | :content => /Demande cre avec succs/ | |
|
68 | end | |
|
65 | 69 | end |
|
66 | 70 | |
|
67 | 71 | def test_show_text_file |
General Comments 0
You need to be logged in to leave comments.
Login now