Project

General

Profile

Defect #32913 » wiki_controller_test.rb.patch

Pavel Rosický, 2020-01-29 01:33

View differences:

wiki_controller_test.rb (working copy)
1022 1022

  
1023 1023
    assert_response :success
1024 1024
    assert_equal 'application/pdf', @response.media_type
1025
    assert_equal 'attachment; filename="ecookbook.pdf"', @response.headers['Content-Disposition']
1025
    assert_equal "attachment; filename=\"ecookbook.pdf\"; filename*=UTF-8''ecookbook.pdf", @response.headers['Content-Disposition']
1026 1026
    assert @response.body.starts_with?('%PDF')
1027 1027
  end
1028 1028

  
......
1087 1087
    assert_response :success
1088 1088

  
1089 1089
    assert_equal 'application/pdf', @response.media_type
1090
    assert_equal 'attachment; filename="CookBook_documentation.pdf"',
1090
    assert_equal "attachment; filename=\"CookBook_documentation.pdf\"; filename*=UTF-8''CookBook_documentation.pdf",
1091 1091
                 @response.headers['Content-Disposition']
1092 1092
  end
1093 1093

  
......
1097 1097
    assert_response :success
1098 1098

  
1099 1099
    assert_equal 'text/html', @response.media_type
1100
    assert_equal 'attachment; filename="CookBook_documentation.html"',
1100
    assert_equal "attachment; filename=\"CookBook_documentation.html\"; filename*=UTF-8''CookBook_documentation.html",
1101 1101
                 @response.headers['Content-Disposition']
1102 1102
    assert_select 'h1', :text => /CookBook documentation/
1103 1103
  end
......
1108 1108
    assert_response :success
1109 1109

  
1110 1110
    assert_equal 'text/html', @response.media_type
1111
    assert_equal 'attachment; filename="CookBook_documentation.html"',
1111
    assert_equal "attachment; filename=\"CookBook_documentation.html\"; filename*=UTF-8''CookBook_documentation.html",
1112 1112
                 @response.headers['Content-Disposition']
1113 1113
    assert_select 'h1', :text => /CookBook documentation v2/
1114 1114
  end
......
1119 1119
    assert_response :success
1120 1120

  
1121 1121
    assert_equal 'text/plain', @response.media_type
1122
    assert_equal 'attachment; filename="CookBook_documentation.txt"',
1122
    assert_equal "attachment; filename=\"CookBook_documentation.txt\"; filename*=UTF-8''CookBook_documentation.txt",
1123 1123
                 @response.headers['Content-Disposition']
1124 1124
    assert_include 'h1. CookBook documentation', @response.body
1125 1125
  end
......
1130 1130
    assert_response :success
1131 1131

  
1132 1132
    assert_equal 'text/plain', @response.media_type
1133
    assert_equal 'attachment; filename="CookBook_documentation.txt"',
1133
    assert_equal "attachment; filename=\"CookBook_documentation.txt\"; filename*=UTF-8''CookBook_documentation.txt",
1134 1134
                 @response.headers['Content-Disposition']
1135 1135
    assert_include 'h1. CookBook documentation v2', @response.body
1136 1136
  end
    (1-1/1)