Skip to content

Commit

Permalink
Include the is_identity key in the tests (#1095)
Browse files Browse the repository at this point in the history
  • Loading branch information
aidanharan authored Sep 25, 2023
1 parent 19234ab commit 38061fd
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions test/cases/coerced_tests.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2447,3 +2447,17 @@ class ActiveRecord::Encryption::EncryptableRecordTest < ActiveRecord::Encryption
# SQL Server does not support upsert. Coerce can be removed after https://github.com/rails/rails/pull/49344
coerce_tests! %r{loading records with encrypted attributes defined on columns with default values}
end

module ActiveRecord
class Migration
class InvalidOptionsTest < ActiveRecord::TestCase
# Include the additional SQL Server migration options.
def invalid_add_column_option_exception_message(key)
default_keys = [":limit", ":precision", ":scale", ":default", ":null", ":collation", ":comment", ":primary_key", ":if_exists", ":if_not_exists"]
default_keys.concat([":is_identity"]) # SQL Server additional valid keys

"Unknown key: :#{key}. Valid keys are: #{default_keys.join(", ")}"
end
end
end
end

0 comments on commit 38061fd

Please sign in to comment.