Skip to content

Commit

Permalink
Make null: false test more explicit
Browse files Browse the repository at this point in the history
  • Loading branch information
Simon Taranto committed Jun 14, 2014
1 parent 895dc05 commit ad32a0c
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions test/ddl_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit ad32a0c

Please sign in to comment.