Sha256: e8194f2485b9715562a6dbaaecb8b6f3cc54fdf9b0036244a315cc813f832d74
Contents?: true
Size: 1.19 KB
Versions: 11
Compression:
Stored size: 1.19 KB
Contents
require 'test_helper' class Kaui::ChargesControllerTest < Kaui::FunctionalTestHelper test 'should get new for new invoice' do get :new, :account_id => @account.account_id assert_response 200 end test 'should get new for existing invoice' do get :new, :invoice_id => @invoice_item.invoice_id assert_response 200 end test 'should create charge' do post :create, :invoice_item => { :account_id => @account.account_id, :amount => 5.34, :currency => 'USD', :description => SecureRandom.uuid } assert_redirected_to invoice_path(assigns(:charge).invoice_id) assert_equal 'Charge was successfully created', flash[:notice] end test 'should create charge for existing invoice' do post :create, :invoice_item => { :account_id => @account.account_id, :invoice_id => @invoice_item.invoice_id, :amount => 5.34, :currency => 'USD', :description => SecureRandom.uuid } assert_redirected_to invoice_path(assigns(:charge).invoice_id) assert_equal 'Charge was successfully created', flash[:notice] end end
Version data entries
11 entries across 11 versions & 1 rubygems