Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions test/date_preposition_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -19,5 +19,14 @@ class DatePrepositionTest < ActiveSupport::TestCase
end
end

test "should use 'IS NOT NULL' rather than '!= NULL'" do
modifier = DatePreposition.new(operator: :ever, values: [])
assert_equal "\"people\".\"birthday\" IS NOT NULL",
modifier.build_arel_for(table[:birthday]).to_sql

assert_equal "values.value::date IS NOT NULL",
modifier.build_arel_for(Arel.sql("values.value::date")).to_sql
end


end