sant0sk1 (owner)

Revisions

gist: 159378 Download_button fork
public
Public Clone URL: git://gist.github.com/159378.git
Embed All Files: show embed
downloads_test.rb #
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
require 'test_helper'
 
class DownloadsTest < ActionController::IntegrationTest
 
  context "An existing donor" do
    setup do
      @donor = Factory(:donor)
    end
    
    should " be able to download a tax receipt" do
      visit "/downloads/tax_receipt"
      fill_in "email", :with => @donor.email
      click_button "Submit"
      assert_equal redirected_to, "/pdfs/taxreceipt.pdf"
    end
  end
  
end