9278: Set expires_at=now if a client sets it to a time in the past.
authorTom Clegg <tom@curoverse.com>
Tue, 7 Jun 2016 17:59:19 +0000 (13:59 -0400)
committerTom Clegg <tom@curoverse.com>
Thu, 9 Jun 2016 14:21:06 +0000 (10:21 -0400)
commitd7d46dfe9b8be649e7bfdd3f65a0f2313b7597d3
tree8e24a3fc3ad4502b52767038e883f913fcc46b05
parent5604e411dec23b6ebaa9f52b4994ed7c30182f92
9278: Set expires_at=now if a client sets it to a time in the past.

The definition of "now" in the default collection scope changes from
current_timestamp (time the current transaction started) to
statement_timestamp() (time the current statement started) so a test
case can expire a collection and then confirm that it is not in the
default scope, all within a single test transaction.
services/api/app/models/collection.rb
services/api/test/unit/collection_test.rb