mirror of
https://github.com/internetee/registry.git
synced 2025-07-01 08:43:37 +02:00
Add csv download test #2691
This commit is contained in:
parent
715e052dcd
commit
fafbba20d6
2 changed files with 9 additions and 0 deletions
|
@ -1,3 +1,5 @@
|
||||||
|
require 'csv'
|
||||||
|
|
||||||
class AccountActivity < ActiveRecord::Base
|
class AccountActivity < ActiveRecord::Base
|
||||||
include Versions
|
include Versions
|
||||||
belongs_to :account
|
belongs_to :account
|
||||||
|
|
|
@ -27,5 +27,12 @@ feature 'Account activity', type: :feature do
|
||||||
current_path.should == '/registrar/account_activities'
|
current_path.should == '/registrar/account_activities'
|
||||||
page.should have_text('+110.0 EUR')
|
page.should have_text('+110.0 EUR')
|
||||||
end
|
end
|
||||||
|
|
||||||
|
it 'should download csv' do
|
||||||
|
visit '/registrar/account_activities'
|
||||||
|
click_link 'Export CSV'
|
||||||
|
response_headers['Content-Type'].should == 'text/csv'
|
||||||
|
response_headers['Content-Disposition'].should match(/attachment; filename="account_activities_\d+\.csv"/)
|
||||||
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue