public-market/spree_batch_api

View on GitHub
spec/actions/spree/inventory/upload_file_action_spec.rb

Summary

Maintainability
A
0 mins
Test Coverage

Complex method describe(#check_product_type)::context#with not supported product type (24.1)
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' }

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

  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 }

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

  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') }

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

There are no issues that match your filters.

Category
Status