Sha256: c0f86116dea2b3658da081d2119672f6b40b3b93f9ce6f40c6d29a33bfdd8926

Contents?: true

Size: 978 Bytes

Versions: 27

Compression:

Stored size: 978 Bytes

Contents

require File.expand_path(File.dirname(__FILE__)) + '/integration_helper'

require 'lhm/invoker'

describe Lhm::Invoker do
  include IntegrationHelper

  before(:each) do
    connect_master!
    @origin = table_create('users')
    @destination = table_create('destination')
    @invoker = Lhm::Invoker.new(Lhm::Table.parse(:users, @connection), @connection)
    @migration = Lhm::Migration.new(@origin, @destination)
    @entangler = Lhm::Entangler.new(@migration, @connection)
    @entangler.before
  end

  after(:each) do
    @entangler.after if @invoker.triggers_still_exist?(@invoker.connection, @entangler)
  end

  describe 'triggers_still_exist?' do
    it 'should return true when triggers still exist' do
      assert @invoker.triggers_still_exist?(@invoker.connection, @entangler)
    end

    it 'should return false when triggers do not exist' do
      @entangler.after

      refute @invoker.triggers_still_exist?(@invoker.connection, @entangler)
    end
  end
end

Version data entries

27 entries across 27 versions & 2 rubygems

Version Path
lhm-shopify-4.4.2 spec/integration/invoker_spec.rb
lhm-shopify-4.4.1 spec/integration/invoker_spec.rb
lhm-shopify-4.4.0 spec/integration/invoker_spec.rb
lhm-shopify-4.3.0 spec/integration/invoker_spec.rb
lhm-shopify-4.2.3 spec/integration/invoker_spec.rb
lhm-shopify-4.2.2 spec/integration/invoker_spec.rb
lhm-shopify-4.2.1 spec/integration/invoker_spec.rb
lhm-shopify-4.2.0 spec/integration/invoker_spec.rb
lhm-shopify-4.1.1 spec/integration/invoker_spec.rb
lhm-shopify-4.1.0 spec/integration/invoker_spec.rb
lhm-shopify-4.0.0 spec/integration/invoker_spec.rb
lhm-teak-3.6.4 spec/integration/invoker_spec.rb
lhm-teak-3.6.3 spec/integration/invoker_spec.rb
lhm-teak-3.6.2 spec/integration/invoker_spec.rb
lhm-teak-3.6.1 spec/integration/invoker_spec.rb
lhm-teak-3.6.0 spec/integration/invoker_spec.rb
lhm-shopify-3.5.5 spec/integration/invoker_spec.rb
lhm-shopify-3.5.4 spec/integration/invoker_spec.rb
lhm-shopify-3.5.3 spec/integration/invoker_spec.rb
lhm-shopify-3.5.2 spec/integration/invoker_spec.rb