Skip to content

Commit

Permalink
Fix postgres migrate_change_column_spec
Browse files Browse the repository at this point in the history
  • Loading branch information
Genki Sugawara committed Apr 12, 2015
1 parent 9171d7b commit 8f36fed
Showing 1 changed file with 28 additions and 0 deletions.
28 changes: 28 additions & 0 deletions spec/postgresql/migrate/migrate_change_column_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -171,5 +171,33 @@
expect(subject.dump).to eq expected_dsl.strip_heredoc.strip.gsub(/(\s*,\s*unsigned: false)?\s*,\s*null: true/, '')
}
end

context 'when string/text without limit (no change)' do
let(:actual_dsl) {
<<-RUBY
create_table "clubs", force: :cascade do |t|
t.string "name", default: "", null: false
t.text "desc"
end
RUBY
}

let(:expected_dsl) {
<<-RUBY
create_table "clubs", force: :cascade do |t|
t.string "name", default: "", null: false
t.text "desc"
end
RUBY
}

before { subject.diff(actual_dsl).migrate }
subject { client }

it {
delta = subject.diff(expected_dsl)
expect(delta.differ?).to be_falsey
}
end
end
end

0 comments on commit 8f36fed

Please sign in to comment.