Sha256: 7969b14b8557719d2a3951c3d79682f8dc1f02dda9cf5c2fd82a12417152a647

Contents?: true

Size: 869 Bytes

Versions: 15

Compression:

Stored size: 869 Bytes

Contents

require 'spec_helper'

describe 'solidus:migrations:create_vat_prices' do
  describe 'up' do
    include_context(
      'rake',
      task_path: Spree::Core::Engine.root.join('lib/tasks/migrations/create_vat_prices.rake'),
      task_name: 'solidus:migrations:create_vat_prices:up',
    )

    context "without a zone" do
      it 'skips' do
        expect { task.invoke }.to output(
          "Creating differentiated prices for VAT countries ... No Zone set as default_tax. Skipping.\n"
        ).to_stdout
      end
    end

    context "with a zone" do
      let!(:zone) { create(:zone, :with_country, default_tax: true) }

      it 'runs' do
        Spree::Deprecation.silence do
          expect { task.invoke }.to output(
            "Creating differentiated prices for VAT countries ... Success.\n"
          ).to_stdout
        end
      end
    end
  end
end

Version data entries

15 entries across 15 versions & 1 rubygems

Version Path
solidus_core-2.3.1 spec/lib/tasks/migrations/create_vat_prices_spec.rb
solidus_core-2.2.2 spec/lib/tasks/migrations/create_vat_prices_spec.rb
solidus_core-2.1.1 spec/lib/tasks/migrations/create_vat_prices_spec.rb
solidus_core-2.3.0 spec/lib/tasks/migrations/create_vat_prices_spec.rb
solidus_core-2.3.0.rc3 spec/lib/tasks/migrations/create_vat_prices_spec.rb
solidus_core-2.3.0.rc2 spec/lib/tasks/migrations/create_vat_prices_spec.rb
solidus_core-2.3.0.rc1 spec/lib/tasks/migrations/create_vat_prices_spec.rb
solidus_core-2.3.0.beta1 spec/lib/tasks/migrations/create_vat_prices_spec.rb
solidus_core-2.2.1 spec/lib/tasks/migrations/create_vat_prices_spec.rb
solidus_core-2.2.0 spec/lib/tasks/migrations/create_vat_prices_spec.rb
solidus_core-2.2.0.rc1 spec/lib/tasks/migrations/create_vat_prices_spec.rb
solidus_core-2.2.0.beta1 spec/lib/tasks/migrations/create_vat_prices_spec.rb
solidus_core-2.1.0 spec/lib/tasks/migrations/create_vat_prices_spec.rb
solidus_core-2.1.0.rc1 spec/lib/tasks/migrations/create_vat_prices_spec.rb
solidus_core-2.1.0.beta1 spec/lib/tasks/migrations/create_vat_prices_spec.rb