mirror of
https://github.com/internetee/registry.git
synced 2025-06-06 20:55:44 +02:00
Update file download HTTP headers in test
This commit is contained in:
parent
1575cf5ea1
commit
155b6e98cb
7 changed files with 11 additions and 11 deletions
|
@ -13,7 +13,7 @@ class AdminAreaInvoicesIntegrationTest < ApplicationIntegrationTest
|
|||
|
||||
assert_response :ok
|
||||
assert_equal 'application/pdf', response.headers['Content-Type']
|
||||
assert_equal 'attachment; filename="invoice-1.pdf"', response.headers['Content-Disposition']
|
||||
assert_equal "attachment; filename=\"invoice-1.pdf\"; filename*=UTF-8''invoice-1.pdf", response.headers['Content-Disposition']
|
||||
assert_not_empty response.body
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
|
@ -21,7 +21,7 @@ class AdminAreaZonesIntegrationTest < ApplicationIntegrationTest
|
|||
|
||||
assert_response :ok
|
||||
assert_equal 'text/plain', response.headers['Content-Type']
|
||||
assert_equal 'attachment; filename="test.txt"', response.headers['Content-Disposition']
|
||||
assert_equal "attachment; filename=\"test.txt\"; filename*=UTF-8''test.txt", response.headers['Content-Disposition']
|
||||
assert_not_empty response.body
|
||||
end
|
||||
end
|
||||
|
|
|
@ -10,7 +10,7 @@ class RegistrantAreaDomainsIntegrationTest < ApplicationIntegrationTest
|
|||
|
||||
assert_response :ok
|
||||
assert_equal "#{Mime[:csv]}; charset=utf-8", response.headers['Content-Type']
|
||||
assert_equal 'attachment; filename="domains.csv"', response.headers['Content-Disposition']
|
||||
assert_equal "attachment; filename=\"domains.csv\"; filename*=UTF-8''domains.csv", response.headers['Content-Disposition']
|
||||
assert_not_empty response.body
|
||||
end
|
||||
|
||||
|
@ -19,7 +19,7 @@ class RegistrantAreaDomainsIntegrationTest < ApplicationIntegrationTest
|
|||
|
||||
assert_response :ok
|
||||
assert_equal Mime[:pdf], response.headers['Content-Type']
|
||||
assert_equal 'attachment; filename="domains.pdf"', response.headers['Content-Disposition']
|
||||
assert_equal "attachment; filename=\"domains.pdf\"; filename*=UTF-8''domains.pdf", response.headers['Content-Disposition']
|
||||
assert_not_empty response.body
|
||||
end
|
||||
end
|
||||
|
|
|
@ -10,7 +10,7 @@ class RegistrarAreaContactsIntegrationTest < ApplicationIntegrationTest
|
|||
|
||||
assert_response :ok
|
||||
assert_equal "#{Mime[:csv]}; charset=utf-8", response.headers['Content-Type']
|
||||
assert_equal 'attachment; filename="contacts.csv"', response.headers['Content-Disposition']
|
||||
assert_equal "attachment; filename=\"contacts.csv\"; filename*=UTF-8''contacts.csv", response.headers['Content-Disposition']
|
||||
assert_not_empty response.body
|
||||
end
|
||||
|
||||
|
@ -19,7 +19,7 @@ class RegistrarAreaContactsIntegrationTest < ApplicationIntegrationTest
|
|||
|
||||
assert_response :ok
|
||||
assert_equal Mime[:pdf], response.headers['Content-Type']
|
||||
assert_equal 'attachment; filename="contacts.pdf"', response.headers['Content-Disposition']
|
||||
assert_equal "attachment; filename=\"contacts.pdf\"; filename*=UTF-8''contacts.pdf", response.headers['Content-Disposition']
|
||||
assert_not_empty response.body
|
||||
end
|
||||
end
|
||||
|
|
|
@ -13,7 +13,7 @@ class RegistrarAreaDomainsIntegrationTest < ApplicationIntegrationTest
|
|||
|
||||
assert_response :ok
|
||||
assert_equal "#{Mime[:csv]}; charset=utf-8", response.headers['Content-Type']
|
||||
assert_equal %(attachment; filename="Domains_#{l(now, format: :filename)}.csv"),
|
||||
assert_equal %(attachment; filename="Domains_#{l(now, format: :filename)}.csv; filename*=UTF-8''Domains_#{l(now, format: :filename)}.csv"),
|
||||
response.headers['Content-Disposition']
|
||||
assert_not_empty response.body
|
||||
end
|
||||
|
|
|
@ -13,7 +13,7 @@ class RegistrarAreaInvoicesIntegrationTest < ApplicationIntegrationTest
|
|||
|
||||
assert_response :ok
|
||||
assert_equal 'application/pdf', response.headers['Content-Type']
|
||||
assert_equal 'attachment; filename="invoice-1.pdf"', response.headers['Content-Disposition']
|
||||
assert_equal "attachment; filename=\"invoice-1.pdf\"; filename*=UTF-8''invoice-1.pdf", response.headers['Content-Disposition']
|
||||
assert_not_empty response.body
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
|
@ -15,7 +15,7 @@ class RegistrarDomainsTest < ApplicationSystemTestCase
|
|||
|
||||
visit registrar_domains_url
|
||||
click_button 'Download CSV'
|
||||
assert_equal 'attachment; filename="Domains_2010-07-05_10.30.csv"', response_headers['Content-Disposition']
|
||||
assert_equal "attachment; filename=\"Domains_2010-07-05_10.30.csv\"; filename*=UTF-8''Domains_2010-07-05_10.30.csv", response_headers['Content-Disposition']
|
||||
assert_equal expected_csv, page.body
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue