spec/actions/spree/inventory/upload_file_action_spec.rb
Complex method describe(#check_product_type)::context#with not supported product type (24.1) Open
Open
context 'with not supported product type' do
subject(:upload) { described_class.call(format: file_format, file_path: 'ean', product_type: product_type) }
let(:product_type) { 'electronics' }
- 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 describe#upload flow (24.1) Open
Open
describe 'upload flow', run_jobs: true do
let(:file_path) { File.join(Dir.pwd, 'spec/fixtures', 'inventory.update.csv') }
let(:variant) { Spree::Variant.last }
before { upload }
- 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 describe##check_format (22.7) Open
Open
describe '#check_format' do
let(:file_format) { 'csv1' }
it { expect { upload }.not_to change(Spree::Upload, :count) }
it { expect(upload[:errors].first).to include('"format"=>["must be one of') }
- 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