features/step_definitions/format_steps.rb in activeadmin-0.4.0 vs features/step_definitions/format_steps.rb in activeadmin-0.4.1
- old
+ new
@@ -12,9 +12,13 @@
Then /^I should see a link to download "([^"]*)"$/ do |format_type|
page.should have_css("#index_footer a", :text => format_type)
end
+Then /^I should not see a link to download "([^"]*)"$/ do |format_type|
+ page.should_not have_css("#index_footer a", :text => format_type)
+end
+
# Check first rows of the displayed CSV.
Then /^I should download a CSV file for "([^"]*)" containing:$/ do |resource_name, table|
page.response_headers['Content-Type'].should == 'text/csv; charset=utf-8'
csv_filename = "#{resource_name}-#{Time.now.strftime("%Y-%m-%d")}.csv"
page.response_headers['Content-Disposition'].should == %{attachment; filename="#{csv_filename}"}