-
Notifications
You must be signed in to change notification settings - Fork 269
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add test for previous vat-included prices fix, fix #129
- Loading branch information
Showing
1 changed file
with
42 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -284,6 +284,48 @@ def fill_in_guest | |
end | ||
end | ||
|
||
context "can process an order with Tax included prices" do | ||
let(:tax_rate) { create(:tax_rate, name: 'VAT Tax', amount: 0.1, | ||
zone: Spree::Zone.first, included_in_price: true) } | ||
let(:tax_category) { create(:tax_category, tax_rates: [tax_rate]) } | ||
let(:product3) { FactoryGirl.create(:product, name: 'EU Charger', tax_category: tax_category) } | ||
let(:tax_string) { "VAT Tax 10.0%" } | ||
|
||
# Regression test for #129 | ||
context "on countries where the Tax is applied" do | ||
|
||
before do | ||
Spree::Zone.first.update_attribute(:default_tax, true) | ||
end | ||
|
||
xit do | ||
This comment has been minimized.
Sorry, something went wrong.
This comment has been minimized.
Sorry, something went wrong.
alepore
Author
Member
|
||
add_to_cart(product3) | ||
visit '/cart' | ||
|
||
within("#cart_adjustments") do | ||
page.should have_content("#{tax_string} (Included in Price)") | ||
end | ||
|
||
click_button 'Checkout' | ||
fill_in_guest | ||
fill_in_billing | ||
click_button "Save and Continue" | ||
click_button "Save and Continue" | ||
find("#paypal_button").click | ||
|
||
within_transaction_cart do | ||
# included taxes should not go on paypal | ||
page.should_not have_content(tax_string) | ||
end | ||
|
||
login_to_paypal | ||
click_button "Pay Now" | ||
page.should have_content("Your order has been processed successfully") | ||
end | ||
end | ||
|
||
end | ||
|
||
context "as an admin" do | ||
stub_authorization! | ||
|
||
|
Does this test even run?
xit
normally marks a test as pending.