mirror of
https://github.com/internetee/registry.git
synced 2025-07-28 05:26:17 +02:00
Add file fixture to download history tests
This commit is contained in:
parent
b78f3e846d
commit
71001ce056
4 changed files with 8 additions and 3 deletions
3
test/fixtures/files/contact_versions.csv
vendored
Normal file
3
test/fixtures/files/contact_versions.csv
vendored
Normal file
|
@ -0,0 +1,3 @@
|
||||||
|
Name,ID,Ident,Registrar,Action,Created at
|
||||||
|
,test_code,[ ],Best Names,update,2018-04-23 15:50:48
|
||||||
|
,,[ ],,update,2010-07-04 21:00:00
|
|
3
test/fixtures/files/domain_versions.csv
vendored
Normal file
3
test/fixtures/files/domain_versions.csv
vendored
Normal file
|
@ -0,0 +1,3 @@
|
||||||
|
Name,Registrant,Registrar,Action,Created at
|
||||||
|
,test_code,Best Names,update,2018-04-23 15:50:48
|
||||||
|
,John,,update,2010-07-04 21:00:00
|
|
|
@ -62,11 +62,10 @@ class ContactVersionsTest < ApplicationSystemTestCase
|
||||||
travel_to now
|
travel_to now
|
||||||
|
|
||||||
get admin_contact_versions_path(format: :csv)
|
get admin_contact_versions_path(format: :csv)
|
||||||
|
|
||||||
assert_response :ok
|
assert_response :ok
|
||||||
assert_equal 'text/csv; charset=utf-8', response.headers['Content-Type']
|
assert_equal 'text/csv; charset=utf-8', response.headers['Content-Type']
|
||||||
assert_equal %(attachment; filename="contact_history_#{Time.zone.now.to_formatted_s(:number)}.csv"; filename*=UTF-8''contact_history_#{Time.zone.now.to_formatted_s(:number)}.csv),
|
assert_equal %(attachment; filename="contact_history_#{Time.zone.now.to_formatted_s(:number)}.csv"; filename*=UTF-8''contact_history_#{Time.zone.now.to_formatted_s(:number)}.csv),
|
||||||
response.headers['Content-Disposition']
|
response.headers['Content-Disposition']
|
||||||
assert_not_empty response.body
|
assert_equal file_fixture('contact_versions.csv').read, response.body
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
|
@ -98,7 +98,7 @@ class DomainVersionsTest < ApplicationSystemTestCase
|
||||||
assert_equal 'text/csv; charset=utf-8', response.headers['Content-Type']
|
assert_equal 'text/csv; charset=utf-8', response.headers['Content-Type']
|
||||||
assert_equal %(attachment; filename="domain_history_#{Time.zone.now.to_formatted_s(:number)}.csv"; filename*=UTF-8''domain_history_#{Time.zone.now.to_formatted_s(:number)}.csv),
|
assert_equal %(attachment; filename="domain_history_#{Time.zone.now.to_formatted_s(:number)}.csv"; filename*=UTF-8''domain_history_#{Time.zone.now.to_formatted_s(:number)}.csv),
|
||||||
response.headers['Content-Disposition']
|
response.headers['Content-Disposition']
|
||||||
assert_not_empty response.body
|
assert_equal file_fixture('domain_versions.csv').read, response.body
|
||||||
end
|
end
|
||||||
|
|
||||||
def test_search_event_param
|
def test_search_event_param
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue