-
Notifications
You must be signed in to change notification settings - Fork 4
Description
puts File.dirname(FILE) + '/../test_helper'
require File.dirname(FILE) + '/../test_helper'
class StoreControllerTest < ActionController::TestCase
def test_with_no_promotions_should_end_up_full_price
# get :checkout
# assert_redirects TODO assert_response :success
# assert_not_nil assigns(:gift_certs)
# redirects since you hain't got nothin' checked out!
end
def test_checkout_posts_at_all
cart = Cart.new
p = Product.create! :code => 'code1', :quantity => 1000, :name => 'name', :price => 1, :date_available => Time.now rescue Product.first cart.add_product p
a = a = Preference.find_by_name('cc_processor')
a.value = Preference::CC_PROCESSORS[2]
a.save
post :checkout, {"commit"=>"Submit Order Information", "action"=>"checkout", "controller"=>"store", "shipping_address"=>{"city"=>"", "zip"=>"", "country_id"=>"1",
"first_name"=>"", "telephone"=>"", "last_name"=>"", "address"=>"", "state"=>""}, "billing_address"=>{"city"=>"t", "zip"=>"84601", "country_id"=>"1", "first_name"=>"t", "telephone"=>"8013776152", "last_name"=>"t", "address"=>"t", "state"=>"ut"},
"order_user"=>{"subscribed_to_email"=>"1", "email_address"=>"t@t.com"}}, {:cart => cart}
assert_redirected_to :action => 'select_shipping_method'
end
end
yes indeed