# query changesets which are closed
# ('closed at' time has passed or changes limit is hit)
def conditions_closed(closed)
- return closed.nil? ? nil : ['closed_at < ? and num_changes > ?',
+ return closed.nil? ? nil : ['closed_at < ? or num_changes > ?',
Time.now.getutc, Changeset::MAX_ELEMENTS]
end
get :query, :open => 'true'
assert_response :success, "can't get changesets by open-ness"
assert_changesets [1,2,4]
+
+ get :query, :closed => 'true'
+ assert_response :success, "can't get changesets by closed-ness"
+ assert_changesets [3,5,6,7]
end
##