[Rt-commit] rt branch, master, updated. rt-4.1.8-389-g07618da

Ruslan Zakirov ruz at bestpractical.com
Wed May 22 09:42:22 EDT 2013


The branch, master has been updated
       via  07618daba5356c6574c99317a0dc2e26980d05c4 (commit)
       via  c5ff6a288cf4291ab21abe72cdcf53de68871110 (commit)
       via  a1aabb80b61f8a169e62cbb6bdb2b3ff1964f1f9 (commit)
      from  d18d0b4e2375a7c3ce31ea2c217b19949db4ffd0 (commit)

Summary of changes:
 lib/RT/User.pm |  2 +-
 t/api/user.t   | 29 ++++++++++++++++++++++++++++-
 2 files changed, 29 insertions(+), 2 deletions(-)

- Log -----------------------------------------------------------------
commit c5ff6a288cf4291ab21abe72cdcf53de68871110
Author: Ruslan Zakirov <ruz at bestpractical.com>
Date:   Wed May 22 17:38:59 2013 +0400

    basic tests for *Bookmark* methods in RT::User

diff --git a/t/api/user.t b/t/api/user.t
index e6b891f..316bcc1 100644
--- a/t/api/user.t
+++ b/t/api/user.t
@@ -2,7 +2,7 @@
 use strict;
 use warnings;
 use RT;
-use RT::Test tests => 111;
+use RT::Test tests => 122;
 
 
 {
@@ -335,3 +335,30 @@ ok($rqv, "Revoked the right successfully - $rqm");
 
 }
 
+{
+    my $root = RT::Test->load_or_create_user( Name => 'root' );
+    ok $root && $root->id;
+
+    my $queue = RT::Test->load_or_create_queue( Name => 'General' );
+    ok $queue && $queue->id;
+
+    my $ticket = RT::Ticket->new( RT->SystemUser );
+    my ($id) = $ticket->Create( Subject => 'test', Queue => $queue );
+    ok $id;
+
+    my $b_ticket = RT::Ticket->new( RT->SystemUser );
+    ($id) = $b_ticket->Create( Subject => 'test', Queue => $queue );
+    ok $id;
+
+    ok $root->ToggleBookmark($b_ticket);
+    ok !$root->ToggleBookmark($b_ticket);
+    ok $root->ToggleBookmark($b_ticket);
+
+    ok $root->HasBookmark( $b_ticket );
+    ok !$root->HasBookmark( $ticket );
+
+    my @marks = $root->Bookmarks;
+    is scalar @marks, 1;
+    is $marks[0], $b_ticket->id;
+}
+

commit 07618daba5356c6574c99317a0dc2e26980d05c4
Merge: d18d0b4 c5ff6a2
Author: Ruslan Zakirov <ruz at bestpractical.com>
Date:   Wed May 22 17:41:55 2013 +0400

    Merge branch '4.2/has-bookmark'


-----------------------------------------------------------------------


More information about the Rt-commit mailing list