Sha256: f402567df83340a877592ac48c6637dc0923fce3242edc95f729d5a39eb5be4c

Contents?: true

Size: 928 Bytes

Versions: 14

Compression:

Stored size: 928 Bytes

Contents

require 'spec_helper'
require_relative '../helper_shared_context'
require 'flydata/helper/action/resync'

module Flydata
  module Helper
    module Action
      describe Resync do
        include_context 'helper context'

        describe "#command" do
          subject { described_class.new(config).command(opts) }

          context 'without opts' do
            let(:opts) { {} }
            it { expect{subject}.to raise_error(/^Wrong tables parameter/) }
          end

          context 'with tables array' do
            let(:opts) { {config_hash: {tables: %w(table_a table_b)}} }
            it { is_expected.to eq("sync:resync -y --force table_a table_b") }
          end

          context 'with tables string' do
            let(:opts) { {config_hash: {tables: "table_a table_b"}} }
            it { is_expected.to eq("sync:resync -y --force table_a table_b") }
          end
        end
      end
    end
  end
end

Version data entries

14 entries across 14 versions & 1 rubygems

Version Path
flydata-0.8.10.2 spec/flydata/helper/action/resync_spec.rb
flydata-0.8.10.1 spec/flydata/helper/action/resync_spec.rb
flydata-0.8.9.11 spec/flydata/helper/action/resync_spec.rb
flydata-0.8.10 spec/flydata/helper/action/resync_spec.rb
flydata-0.8.9 spec/flydata/helper/action/resync_spec.rb
flydata-0.8.8 spec/flydata/helper/action/resync_spec.rb
flydata-0.8.7 spec/flydata/helper/action/resync_spec.rb
flydata-0.8.6 spec/flydata/helper/action/resync_spec.rb
flydata-0.8.5 spec/flydata/helper/action/resync_spec.rb
flydata-0.8.4 spec/flydata/helper/action/resync_spec.rb
flydata-0.8.3 spec/flydata/helper/action/resync_spec.rb
flydata-0.8.2 spec/flydata/helper/action/resync_spec.rb
flydata-0.8.1 spec/flydata/helper/action/resync_spec.rb
flydata-0.8.0 spec/flydata/helper/action/resync_spec.rb