Sha256: 0ae4564998e57b8e3f405fe288d87803acc384d5d038587ed4d196ecb54cf040

Contents?: true

Size: 963 Bytes

Versions: 34

Compression:

Stored size: 963 Bytes

Contents

require 'fluent_plugins_spec_helper'
require 'flydata/source_mysql/plugin_support/context'

describe ::Flydata::SourceMysql::PluginSupport::Context do
  let(:subject_object) { described_class.new(params) }

  describe '#initialize' do
    subject { subject_object }

    let(:sync_fm) { double('sync_fm') }

    before do
      allow(sync_fm).to receive(:get_table_source_raw_pos).and_return('-')
    end

    context 'when no missing params' do
      let(:params) { {
        tables: %w(table_a table_b table_c),
        tag: 'test_tag',
        sync_fm: sync_fm,
        omit_events: {'table_c' => %i(delete truncate_table)},
        table_revs: {'table_a' => 1, 'table_b' => 2, 'table_c' => 3},
        database: 'test_db',
        table_meta: 'test_table_meta',
      } }

      it { expect{subject}.not_to raise_error }
      it { expect(subject.database).to eq('test_db') }
      it { expect(subject.table_meta).to eq('test_table_meta') }
    end
  end
end

Version data entries

34 entries across 34 versions & 1 rubygems

Version Path
flydata-0.8.10.2 spec/flydata/source_mysql/plugin_support/context_spec.rb
flydata-0.8.10.1 spec/flydata/source_mysql/plugin_support/context_spec.rb
flydata-0.8.9.11 spec/flydata/source_mysql/plugin_support/context_spec.rb
flydata-0.8.10 spec/flydata/source_mysql/plugin_support/context_spec.rb
flydata-0.8.9 spec/flydata/source_mysql/plugin_support/context_spec.rb
flydata-0.8.8 spec/flydata/source_mysql/plugin_support/context_spec.rb
flydata-0.8.7 spec/flydata/source_mysql/plugin_support/context_spec.rb
flydata-0.8.6 spec/flydata/source_mysql/plugin_support/context_spec.rb
flydata-0.8.5 spec/flydata/source_mysql/plugin_support/context_spec.rb
flydata-0.8.4 spec/flydata/source_mysql/plugin_support/context_spec.rb
flydata-0.8.3 spec/flydata/source_mysql/plugin_support/context_spec.rb
flydata-0.8.2 spec/flydata/source_mysql/plugin_support/context_spec.rb
flydata-0.8.1 spec/flydata/source_mysql/plugin_support/context_spec.rb
flydata-0.8.0 spec/flydata/source_mysql/plugin_support/context_spec.rb
flydata-0.7.19 spec/flydata/source_mysql/plugin_support/context_spec.rb
flydata-0.7.18 spec/flydata/source_mysql/plugin_support/context_spec.rb
flydata-0.7.17 spec/flydata/source_mysql/plugin_support/context_spec.rb
flydata-0.7.16 spec/flydata/source_mysql/plugin_support/context_spec.rb
flydata-0.7.15 spec/flydata/source_mysql/plugin_support/context_spec.rb
flydata-0.7.14 spec/flydata/source_mysql/plugin_support/context_spec.rb