Sha256: c80d91b6c643c6d7feff1aca1e43591ca5e743f0342b358676cdb0d3ebb3d08a
Contents?: true
Size: 936 Bytes
Versions: 2
Compression:
Stored size: 936 Bytes
Contents
require 'spec_helper' describe SpreeAvataxOfficial::Seeder do describe '#seed!' do subject { described_class.new.seed! } let!(:usa) { create(:country, name: 'United States', iso3: 'USA') } let!(:pennslyvania) { create(:state, name: 'Pennsylvania', abbr: 'PA') } let!(:shipping_method) { create(:shipping_method, tax_category: nil) } let(:clothing_tax_category) { Spree::TaxCategory.find_by(name: 'Clothing') } let(:shipping_tax_category) { Spree::TaxCategory.find_by(name: 'Shipping') } it 'creates Clothing and Shipping tax categories and assigns Shipping tax category' do subject expect(clothing_tax_category).to be_present expect(clothing_tax_category.tax_code).to eq 'P0000000' expect(shipping_tax_category).to be_present expect(shipping_tax_category.tax_code).to eq 'FR' expect(shipping_method.reload.tax_category).to eq shipping_tax_category end end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
spree_avatax_official-1.8.0 | spec/lib/spree_avatax_official/seeder_spec.rb |
spree_avatax_official-1.7.1 | spec/lib/spree_avatax_official/seeder_spec.rb |