Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fails on this code #1

Open
rdp opened this issue Aug 8, 2009 · 0 comments
Open

fails on this code #1

rdp opened this issue Aug 8, 2009 · 0 comments

Comments

@rdp
Copy link
Owner

rdp commented Aug 8, 2009

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"=>"[email protected]"}}, {:cart => cart}
assert_redirected_to :action => 'select_shipping_method'
end

end

yes indeed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant