Commit 4befe13d2c487fd3833adb41ca1704e625eb127c

Authored by Rodrigo Souto
1 parent 6475a4d3

content_viewer_test: explicitly test content_disposition type of uploaded_file

test/functional/content_viewer_controller_test.rb
@@ -74,6 +74,7 @@ class ContentViewerControllerTest < ActionController::TestCase @@ -74,6 +74,7 @@ class ContentViewerControllerTest < ActionController::TestCase
74 assert_response :success 74 assert_response :success
75 assert_match /^text\/html/, @response.headers['Content-Type'] 75 assert_match /^text\/html/, @response.headers['Content-Type']
76 assert @response.headers['Content-Disposition'].present? 76 assert @response.headers['Content-Disposition'].present?
  77 + assert_match /attachment/, @response.headers['Content-Disposition']
77 end 78 end
78 79
79 should 'produce a download-link when article is not text/html' do 80 should 'produce a download-link when article is not text/html' do