Fic enterprise fee summary report system spec

This commit is contained in:
Gaetan Craig-Riou
2024-05-21 13:55:09 +10:00
parent 61750c51b3
commit 0167357f8f

View File

@@ -43,10 +43,10 @@ RSpec.describe "Enterprise Summary Fee with Tax Report By Producer" do
create(:supplier_enterprise, name: 'Supplier2', charges_sales_tax: true,
owner_id: supplier2_owner.id)
}
let!(:product){ create(:simple_product, supplier: ) }
let!(:product2){ create(:simple_product, supplier: supplier2 ) }
let!(:variant){ create(:variant, product_id: product.id, tax_category:) }
let!(:variant2){ create(:variant, product_id: product2.id, tax_category:) }
let!(:product){ create(:simple_product) }
let!(:product2){ create(:simple_product) }
let!(:variant){ create(:variant, product_id: product.id, tax_category:, supplier:) }
let!(:variant2){ create(:variant, product_id: product2.id, tax_category:, supplier: supplier2) }
let!(:distributor_owner) { create(:user, enterprise_limit: 1) }
let!(:distributor){
distributor = create(:distributor_enterprise_with_tax, name: 'Distributor',
@@ -169,17 +169,6 @@ RSpec.describe "Enterprise Summary Fee with Tax Report By Producer" do
order2
}
before do
product.update!({
tax_category_id: tax_category.id,
supplier_id: supplier.id
})
product2.update!({
tax_category_id: tax_category.id,
supplier_id: supplier2.id
})
end
context 'added tax' do
# 1 order cycle has:
# - coordinator fees (20) 1.5% = 0.30, 2.5% = 0.50