From ad32a0ce6a9f1f7d1cefa3f922ba332fd2e89236 Mon Sep 17 00:00:00 2001 From: Simon Taranto Date: Fri, 13 Jun 2014 17:18:41 -0700 Subject: [PATCH] Make null: false test more explicit --- test/ddl_test.rb | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/test/ddl_test.rb b/test/ddl_test.rb index 5fc4aee0..64958865 100644 --- a/test/ddl_test.rb +++ b/test/ddl_test.rb @@ -82,11 +82,14 @@ def test_add_geometry_column def test_add_geometry_column_null_false klass = create_ar_class klass.connection.create_table(:spatial_test) do |t| - t.column('latlon', :geometry, null: false) + t.column('latlon_null', :geometry, null: false) + t.column('latlon', :geometry) end - geometry_column = klass.columns[1] + null_false_column = klass.columns[1] + null_true_column = klass.columns[2] - refute(geometry_column.null, 'Column should be null: false') + refute(null_false_column.null, 'Column should be null: false') + assert(null_true_column.null, 'Column should be null: true') end def test_add_geography_column