diff options
author | Yves Senn <yves.senn@gmail.com> | 2014-05-08 12:39:16 +0200 |
---|---|---|
committer | Yves Senn <yves.senn@gmail.com> | 2014-05-08 12:46:18 +0200 |
commit | 7f1fd0265cb11544ae7cc94fb417c6abddcf2ee3 (patch) | |
tree | abe712fbf6fd7b4f4ff12761fb6afaf5cb2d4af3 /activerecord | |
parent | 71e8adc35411ab6b357a6f97207da4d93c4fd627 (diff) | |
download | rails-7f1fd0265cb11544ae7cc94fb417c6abddcf2ee3.tar.gz rails-7f1fd0265cb11544ae7cc94fb417c6abddcf2ee3.tar.bz2 rails-7f1fd0265cb11544ae7cc94fb417c6abddcf2ee3.zip |
test, reset changed state in PG's uuid tests.
This resulted in some unrelated errors on Traivs:
1) Error:
PostgresqlUUIDTest#test_treat_blank_uuid_as_nil:
ActiveRecord::StatementInvalid: PG::UndefinedColumn: ERROR: column "thingy" of relation "uuid_data_type" does not exist
LINE 1: INSERT INTO "uuid_data_type" ("thingy") VALUES ($1) RETURNIN...
^
: INSERT INTO "uuid_data_type" ("thingy") VALUES ($1) RETURNING "id"
/cc @zuhao
Diffstat (limited to 'activerecord')
-rw-r--r-- | activerecord/test/cases/adapters/postgresql/uuid_test.rb | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/activerecord/test/cases/adapters/postgresql/uuid_test.rb b/activerecord/test/cases/adapters/postgresql/uuid_test.rb index bdf8e15e3e..ffce7c0d5f 100644 --- a/activerecord/test/cases/adapters/postgresql/uuid_test.rb +++ b/activerecord/test/cases/adapters/postgresql/uuid_test.rb @@ -45,12 +45,14 @@ class PostgresqlUUIDTest < ActiveRecord::TestCase UUIDType.reset_column_information column = UUIDType.columns.find { |c| c.name == '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.find { |c| c.name == 'thingy' } assert_equal "uuid_generate_v4()", column.default_function + ensure + UUIDType.reset_column_information end def test_data_type_of_uuid_types |