mirror of
https://github.com/rails/rails.git
synced 2022-11-09 12:12:34 -05:00
Merge pull request #20257 from prathamesh-sonpatki/test-for-serial-for-quoted-sequence
Added test case for serial? method when sequence name is not quoted
This commit is contained in:
commit
c9f7350f63
1 changed files with 6 additions and 0 deletions
|
@ -182,6 +182,12 @@ class PrimaryKeysTest < ActiveRecord::TestCase
|
|||
assert_equal "nextval('\"mixed_case_monkeys_monkeyID_seq\"'::regclass)", column.default_function
|
||||
assert column.serial?
|
||||
end
|
||||
|
||||
def test_serial_with_unquoted_sequence_name
|
||||
column = Topic.columns_hash[Topic.primary_key]
|
||||
assert_equal "nextval('topics_id_seq'::regclass)", column.default_function
|
||||
assert column.serial?
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
|
|
Loading…
Reference in a new issue