diff options
Diffstat (limited to 'test/attributes/test_attribute.rb')
-rw-r--r-- | test/attributes/test_attribute.rb | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/test/attributes/test_attribute.rb b/test/attributes/test_attribute.rb index f55e39cfe9..12dd25291e 100644 --- a/test/attributes/test_attribute.rb +++ b/test/attributes/test_attribute.rb @@ -180,6 +180,9 @@ module Arel mgr.to_sql.must_be_like %{ SELECT "users"."id" FROM "users" WHERE "users"."id" < 10 } + + mgr.where relation[:created_at].lt(::Time.now) + mgr.to_sql.must_match %{"users"."created_at" <} end end @@ -228,6 +231,9 @@ module Arel mgr.to_sql.must_be_like %{ SELECT "users"."id" FROM "users" WHERE "users"."id" <= 10 } + + mgr.where relation[:created_at].lteq(::Time.now) + mgr.to_sql.must_match %{"users"."created_at" <=} end end |