Sha256: d1ab910516228569ff36b795d93f7b78f12af91b64569803388a264d711a9e75

Contents?: true

Size: 1.07 KB

Versions: 10

Compression:

Stored size: 1.07 KB

Contents

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

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

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

          context 'without opts' do
            let(:opts) { {} }
            it { is_expected.to eq("sync:flush -y ") }
          end

          context 'with skip flush option' do
            let(:opts) { {config_hash: {skip_flush: true}} }
            it { is_expected.to eq("sync:flush -y  --skip-flush") }
          end

          context 'with server-timeout option' do
            let(:opts) { {config_hash: {server_timeout: 180}} }
            it { is_expected.to eq("sync:flush -y  --server-timeout 180")}
          end

          context 'with dont-wait-upload option' do
            let(:opts) { {config_hash: {dont_wait_upload: true}} }
            it { is_expected.to eq("sync:flush -y  --dont-wait-upload")}
          end
        end
      end
    end
  end
end

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
flydata-0.8.10.2 spec/flydata/helper/action/flush_spec.rb
flydata-0.8.10.1 spec/flydata/helper/action/flush_spec.rb
flydata-0.8.9.11 spec/flydata/helper/action/flush_spec.rb
flydata-0.8.10 spec/flydata/helper/action/flush_spec.rb
flydata-0.8.9 spec/flydata/helper/action/flush_spec.rb
flydata-0.8.8 spec/flydata/helper/action/flush_spec.rb
flydata-0.8.7 spec/flydata/helper/action/flush_spec.rb
flydata-0.8.6 spec/flydata/helper/action/flush_spec.rb
flydata-0.8.5 spec/flydata/helper/action/flush_spec.rb
flydata-0.8.4 spec/flydata/helper/action/flush_spec.rb