diff options
author | Azul <azul@leap.se> | 2012-11-27 13:01:57 +0100 |
---|---|---|
committer | Azul <azul@leap.se> | 2012-11-27 13:01:57 +0100 |
commit | 15d13d9abb9165b23369ea91d58505ca98d48b31 (patch) | |
tree | f3084615547baae0bb485c7f0d602b5e16d59da5 /help/test/unit | |
parent | ebf5dddc39f09bac6640084edbaaefa9c9d48477 (diff) |
first attempts to map comments
Diffstat (limited to 'help/test/unit')
-rw-r--r-- | help/test/unit/ticket_test.rb | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/help/test/unit/ticket_test.rb b/help/test/unit/ticket_test.rb index 6b63a23..73a2af5 100644 --- a/help/test/unit/ticket_test.rb +++ b/help/test/unit/ticket_test.rb @@ -23,7 +23,7 @@ class TicketTest < ActiveSupport::TestCase #user = LeapWebUsers::User.create #t.user = user - + #t.email = '' #invalid #assert !t.valid? #t.email = 'blah@blah.com, bb@jjj.org' @@ -40,7 +40,7 @@ class TicketTest < ActiveSupport::TestCase @sample.created_by = 22 #current_user assert @sample.is_creator_validated? end - + =begin # TODO: do once have current_user stuff in order test "code if & only if not creator-validated" do @@ -56,6 +56,14 @@ class TicketTest < ActiveSupport::TestCase end =end + test "finds open tickets sorted by created_at" do + tickets = Ticket.by_is_open_and_created_at. + startkey([true, 0]). + endkey([true, Time.now]) + assert_equal Ticket.by_is_open.key(true).count, tickets.count + end + + end |