Skip to content

fails on this code #1

Description

@rdp

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

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions