Sha256: ba03c99a4413e10f8ed833489b32991a35ad6ac0ccab41dff6c8f7a7e7e8cfb8
Contents?: true
Size: 1.25 KB
Versions: 18
Compression:
Stored size: 1.25 KB
Contents
describe 'Ridgepole::Client (with bigint pk)', condition: [:mysql_awesome_enabled, :activerecord_5] do let(:dsl1) { erbh(<<-EOS) create_table "books", id: :primary_key, limit: 8, force: :cascade do |t| t.string "title", <%= i limit(255) + {null: false} %> t.integer "author_id", <%= i limit(4) + {null: false} %> t.datetime "created_at" t.datetime "updated_at" end EOS } let(:dsl2) { erbh(<<-EOS) create_table "books", id: :bigint, force: :cascade do |t| t.string "title", <%= i limit(255) + {null: false} %> t.integer "author_id", <%= i limit(4) + {null: false} %> t.datetime "created_at" t.datetime "updated_at" end EOS } context 'when with limit:8' do subject { client } before { subject.diff(dsl1).migrate } it { expect(show_create_table(:books)).to include '`id` bigint(20) NOT NULL AUTO_INCREMENT' expect(subject.dump).to match_fuzzy dsl2 } end context 'when with id:bigint' do subject { client } before { subject.diff(dsl2).migrate } it { expect(show_create_table(:books)).to include '`id` bigint(20) NOT NULL AUTO_INCREMENT' expect(subject.dump).to match_fuzzy dsl2 } end end
Version data entries
18 entries across 18 versions & 1 rubygems