Skip to content

Commit

Permalink
Should test test_change_column_default in PostgresqlUUIDTest
Browse files Browse the repository at this point in the history
Follow up to #25395.
  • Loading branch information
kamipo committed Nov 24, 2016
1 parent 1b795f5 commit e683950
Showing 1 changed file with 13 additions and 13 deletions.
26 changes: 13 additions & 13 deletions activerecord/test/cases/adapters/postgresql/uuid_test.rb
Expand Up @@ -43,20 +43,20 @@ def test_uuid_column_default
column = UUIDType.columns_hash["thingy"]
assert_equal "gen_random_uuid()", column.default_function
end
else
def test_change_column_default
connection.add_column :uuid_data_type, :thingy, :uuid, null: false, default: "uuid_generate_v1()"
UUIDType.reset_column_information
column = UUIDType.columns_hash["thingy"]
assert_equal "uuid_generate_v1()", column.default_function
end

connection.change_column :uuid_data_type, :thingy, :uuid, null: false, default: "uuid_generate_v4()"
UUIDType.reset_column_information
column = UUIDType.columns_hash["thingy"]
assert_equal "uuid_generate_v4()", column.default_function
ensure
UUIDType.reset_column_information
end
def test_change_column_default
connection.add_column :uuid_data_type, :thingy, :uuid, null: false, default: "uuid_generate_v1()"
UUIDType.reset_column_information
column = UUIDType.columns_hash["thingy"]
assert_equal "uuid_generate_v1()", column.default_function

connection.change_column :uuid_data_type, :thingy, :uuid, null: false, default: "uuid_generate_v4()"
UUIDType.reset_column_information
column = UUIDType.columns_hash["thingy"]
assert_equal "uuid_generate_v4()", column.default_function
ensure
UUIDType.reset_column_information
end

def test_data_type_of_uuid_types
Expand Down

0 comments on commit e683950

Please sign in to comment.