[Rt-commit] r13143 - in rt/branches/3.8-TESTING: .

sartak at bestpractical.com sartak at bestpractical.com
Tue Jun 10 17:34:54 EDT 2008


Author: sartak
Date: Tue Jun 10 17:34:54 2008
New Revision: 13143

Modified:
   rt/branches/3.8-TESTING/   (props changed)
   rt/branches/3.8-TESTING/t/web/rest.t

Log:
 r62144 at onn:  sartak | 2008-06-10 17:34:19 -0400
 Make sure that specifying our weird CF as a field works, and a basic REST search test


Modified: rt/branches/3.8-TESTING/t/web/rest.t
==============================================================================
--- rt/branches/3.8-TESTING/t/web/rest.t	(original)
+++ rt/branches/3.8-TESTING/t/web/rest.t	Tue Jun 10 17:34:54 2008
@@ -1,7 +1,7 @@
 #!/usr/bin/env perl
 use strict;
 use warnings;
-use Test::More tests => 9;
+use Test::More tests => 13;
 use RT::Test;
 
 my ($baseurl, $m) = RT::Test->started_ok;
@@ -50,3 +50,19 @@
 is($ticket->Subject, "REST interface", "subject successfully set");
 is($ticket->FirstCustomFieldValue("fu()n:k/"), "maximum", "CF successfully set");
 
+$m->post("$baseurl/REST/1.0/search/ticket", [
+    user    => 'root',
+    pass    => 'password',
+    query   => "id=$id",
+    fields  => "Subject,CF-fu()n:k/,Status",
+]);
+
+# the fields are interpreted server-side a hash (why?), so we can't depend
+# on order
+for ("id: ticket/1",
+     "Subject: REST interface",
+     "CF-fu()n:k/: maximum",
+     "Status: new") {
+        $m->content_contains($_);
+}
+


More information about the Rt-commit mailing list