Sha256: 4f61ba6330686bb369d1121baec97daee0553407519629bfeb7618c922669edb

Contents?: true

Size: 905 Bytes

Versions: 3

Compression:

Stored size: 905 Bytes

Contents

describe 'Ridgepole::Client#dump' do
  context 'when there is a tables' do
    before { restore_tables_mysql_unknown_column_type }
    subject { client }

    it {
      expect(subject.dump).to match_fuzzy erbh(<<-EOS)
        create_table "clubs", <%= i cond('>= 5.1',id: :integer) %>, unsigned: true, force: :cascade do |t|
          t.string "name", default: "", null: false
          t.index ["name"], name: "idx_name", unique: true, <%= i cond(5.0, using: :btree) %>
        end
      EOS
    }

    it {
      expect(Ridgepole::Logger.instance).to receive(:warn).twice
      subject.dump
    }

    it {
      expect(Ridgepole::Logger.instance).to receive(:warn).with("[WARNING] Could not dump table \"places\" because of following StandardError")
      expect(Ridgepole::Logger.instance).to receive(:warn).with("   Unknown type 'geometry' for column 'location'")
      subject.dump
    }
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
ridgepole-0.7.3.beta spec/mysql/dump/dump_unknown_column_type_spec.rb
ridgepole-0.7.2 spec/mysql/dump/dump_unknown_column_type_spec.rb
ridgepole-0.7.2.beta spec/mysql/dump/dump_unknown_column_type_spec.rb