Sha256: 93e48b8da5a9bbfa9f0b44fce11abcf2e420c7406bd3beb61e27dd2ff801988d

Contents?: true

Size: 1.6 KB

Versions: 9

Compression:

Stored size: 1.6 KB

Contents

require 'spec_helper'

describe KPM::Migrations, :skip_me_if_nil => ENV['TOKEN'].nil? do

  context 'plugins' do
    it 'should be able to find migrations for a java plugin' do
      migrations = KPM::Migrations.new('analytics-plugin-3.0.2', nil, 'killbill/killbill-analytics-plugin', ENV['TOKEN']).migrations
      # No migration yet
      migrations.size.should == 0
    end

    it 'should be able to find migrations for a ruby plugin' do
      migrations = KPM::Migrations.new('master', nil, 'killbill/killbill-cybersource-plugin', ENV['TOKEN']).migrations
      # No migration yet
      migrations.size.should == 1
    end
  end

  context 'killbill' do
    it 'should be able to find migrations between two versions' do
      migrations = KPM::Migrations.new('killbill-0.16.3', 'killbill-0.16.4', 'killbill/killbill', ENV['TOKEN']).migrations

      migrations.size.should == 1
      migrations.first[:name].should == 'V20160324060345__revisit_payment_methods_indexes_509.sql'
      migrations.first[:sql].should == "drop index payment_methods_active_accnt on payment_methods;\n"

      KPM::Migrations.new('master', 'master', 'killbill/killbill', ENV['TOKEN']).migrations.size.should == 0
    end

    it 'should be able to find migrations for a given version' do
      migrations = KPM::Migrations.new('killbill-0.16.4', nil, 'killbill/killbill', ENV['TOKEN']).migrations

      migrations.size.should == 1
      migrations.first[:name].should == 'V20160324060345__revisit_payment_methods_indexes_509.sql'
      migrations.first[:sql].should == "drop index payment_methods_active_accnt on payment_methods;\n"
    end
  end
end

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
kpm-0.7.2 spec/kpm/remote/migrations_spec.rb
kpm-0.7.1 spec/kpm/remote/migrations_spec.rb
kpm-0.7.0 spec/kpm/remote/migrations_spec.rb
kpm-0.6.5 spec/kpm/remote/migrations_spec.rb
kpm-0.6.4 spec/kpm/remote/migrations_spec.rb
kpm-0.6.3 spec/kpm/remote/migrations_spec.rb
kpm-0.6.2 spec/kpm/remote/migrations_spec.rb
kpm-0.6.1 spec/kpm/remote/migrations_spec.rb
kpm-0.6.0 spec/kpm/remote/migrations_spec.rb