Skip to content

Commit

Permalink
Merge pull request #467 from mi-wada/fix-bug-cannot-include-single-qu…
Browse files Browse the repository at this point in the history
…ote-in-table-comment

Add test case when single quote is in table comment
  • Loading branch information
winebarrel committed Feb 25, 2024
2 parents 9f4a94e + 719f191 commit bddc256
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions spec/mysql/migrate/migrate_change_table_comment_spec.rb
Expand Up @@ -10,6 +10,9 @@
t.string "gender", limit: 1, null: false
t.date "hire_date", null: false
end
create_table "tenants", force: :cascade, comment: "old comment '" do |t|
end
ERB
end

Expand All @@ -22,6 +25,9 @@
t.string "gender", limit: 1, null: false
t.date "hire_date", null: false
end
create_table "tenants", force: :cascade, comment: "new comment '" do |t|
end
ERB
end

Expand All @@ -36,6 +42,11 @@
# Table option changes are ignored on `employees`.
from: {:comment=>"old comment"}
to: {:comment=>"new comment"}
MSG
expect(Ridgepole::Logger.instance).to receive(:verbose_info).once.with(<<-MSG)
# Table option changes are ignored on `tenants`.
from: {:comment=>"old comment '"}
to: {:comment=>"new comment '"}
MSG
delta = subject.diff(expected_dsl)
expect(delta.differ?).to be_falsey
Expand Down

0 comments on commit bddc256

Please sign in to comment.