spec/actions/spree/inventory/base_import_action_spec.rb
Complex method context#when pass 1 item (40.3) Open
Open
context 'when pass 1 item' do
let(:items) { [item] }
it { expect(upload.total).to eq(1) }
it { expect(upload.reload.processed).to eq(1) }
- Read upRead up
- Exclude checks
Flog calculates the ABC score for methods. The ABC score is based on assignments, branches (method calls), and conditions.
You can read more about ABC metrics or the flog tool
Complex method context#when have error (38.6) Open
Open
context 'when have error' do
let(:items) { [{ ean: 'UNKNOWN' }] }
it { expect(upload.total).to eq(1) }
it { expect(upload.reload.processed).to eq(1) }
- Read upRead up
- Exclude checks
Flog calculates the ABC score for methods. The ABC score is based on assignments, branches (method calls), and conditions.
You can read more about ABC metrics or the flog tool
Complex method context(when provider is specified)::context#with existing provider (34.1) Open
Open
context 'with existing provider' do
class RealSellerVariantProvider < Spree::Inventory::Providers::Fake::VariantProvider; end
let(:opts) { { file_path: '', product_type: :fake, provider: :real_seller } }
- Read upRead up
- Exclude checks
Flog calculates the ABC score for methods. The ABC score is based on assignments, branches (method calls), and conditions.
You can read more about ABC metrics or the flog tool
Complex method context(when provider is specified)::context#with not existing provider (25.2) Open
Open
context 'with not existing provider' do
it { expect(upload.reload.upload_errors.count).to eq(1) }
it { expect(Spree::Product.count).to eq(0) }
- Read upRead up
- Exclude checks
Flog calculates the ABC score for methods. The ABC score is based on assignments, branches (method calls), and conditions.
You can read more about ABC metrics or the flog tool