Adds included_in_price trait on broken specs

This commit is contained in:
filipefurtad0
2022-07-30 16:13:18 +01:00
parent 0c491a6651
commit 8b146fc72a
4 changed files with 10 additions and 5 deletions

View File

@@ -424,7 +424,7 @@ describe '
end
let!(:order) do
create(:order_with_taxes, distributor: distributor1, ship_address: create(:address),
product_price: 110, tax_rate_amount: 0.1,
product_price: 110, tax_rate_amount: 0.1, included_in_price: true,
tax_rate_name: "Tax 1").tap do |order|
order.create_tax_charge!
order.update_shipping_fees!

View File

@@ -208,8 +208,13 @@ describe '
create(:order, order_cycle: order_cycle, distributor: user1.enterprises.first,
ship_address: address, bill_address: address)
}
let(:product1) { create(:taxed_product, zone: zone, price: 12.54, tax_rate_amount: 0) }
let(:product2) { create(:taxed_product, zone: zone, price: 500.15, tax_rate_amount: 0.2) }
let(:product1) {
create(:taxed_product, zone: zone, price: 12.54, tax_rate_amount: 0, included_in_price: true)
}
let(:product2) {
create(:taxed_product, zone: zone, price: 500.15, tax_rate_amount: 0.2,
included_in_price: true)
}
let!(:line_item1) {
create(:line_item, variant: product1.variants.first, price: 12.54, quantity: 1, order: order1)

View File

@@ -22,7 +22,7 @@ describe "full-page cart", js: true do
create(:enterprise_fee, amount: 11.00, tax_category: product_with_tax.tax_category)
}
let(:product_with_tax) {
create(:taxed_product, supplier: supplier, zone: zone, price: 110.00, tax_rate_amount: 0.1)
create(:taxed_product, supplier: supplier, zone: zone, price: 110.00, tax_rate_amount: 0.1, included_in_price: true)
}
let(:product_with_fee) {
create(:simple_product, supplier: supplier, price: 0.86, on_hand: 100)

View File

@@ -21,7 +21,7 @@ describe "As a consumer I want to check out my cart", js: true do
let(:fee_tax_rate) { create(:tax_rate, amount: 0.10, zone: zone, included_in_price: true) }
let(:fee_tax_category) { create(:tax_category, tax_rates: [fee_tax_rate]) }
let(:product) {
create(:taxed_product, supplier: supplier, price: 10, zone: zone, tax_rate_amount: 0.1)
create(:taxed_product, supplier: supplier, price: 10, zone: zone, tax_rate_amount: 0.1, included_in_price: true)
}
let(:variant) { product.variants.first }
let(:order) {