From e68395031aace569d850d5ab272dec55769a74cf Mon Sep 17 00:00:00 2001 From: Ryuta Kamizono Date: Fri, 25 Nov 2016 06:23:19 +0900 Subject: [PATCH] Should test `test_change_column_default` in `PostgresqlUUIDTest` Follow up to #25395. --- .../cases/adapters/postgresql/uuid_test.rb | 26 +++++++++---------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/activerecord/test/cases/adapters/postgresql/uuid_test.rb b/activerecord/test/cases/adapters/postgresql/uuid_test.rb index abc27c2204..4604c2eb3b 100644 --- a/activerecord/test/cases/adapters/postgresql/uuid_test.rb +++ b/activerecord/test/cases/adapters/postgresql/uuid_test.rb @@ -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 -- GitLab