summaryrefslogtreecommitdiff
path: root/rt/t/web/ticket_seen.t
diff options
context:
space:
mode:
authorIvan Kohler <ivan@freeside.biz>2012-04-24 11:35:56 -0700
committerIvan Kohler <ivan@freeside.biz>2012-04-24 11:35:56 -0700
commit6587f6ba7d047ddc1686c080090afe7d53365bd4 (patch)
treeec77342668e8865aca669c9b4736e84e3077b523 /rt/t/web/ticket_seen.t
parent47153aae5c2fc00316654e7277fccd45f72ff611 (diff)
first pass RT4 merge, RT#13852
Diffstat (limited to 'rt/t/web/ticket_seen.t')
-rw-r--r--rt/t/web/ticket_seen.t24
1 files changed, 12 insertions, 12 deletions
diff --git a/rt/t/web/ticket_seen.t b/rt/t/web/ticket_seen.t
index 3a77a5899..8dacaf59f 100644
--- a/rt/t/web/ticket_seen.t
+++ b/rt/t/web/ticket_seen.t
@@ -3,7 +3,7 @@
use strict;
use warnings;
-use RT::Test tests => 21;
+use RT::Test nodata => 1, tests => 23, config => 'Set($ShowUnreadMessageNotifications, 1);';
my $queue = RT::Test->load_or_create_queue( Name => 'Regression' );
ok $queue && $queue->id, 'loaded or created queue';
@@ -30,7 +30,7 @@ ok $agent_a->login('user_a', 'password'), 'logged in as user A';
my $agent_b = RT::Test::Web->new;
ok $agent_b->login('user_b', 'password'), 'logged in as user B';
-diag "create a ticket for testing" if $ENV{TEST_VERBOSE};
+diag "create a ticket for testing";
my $tid;
{
my $ticket = RT::Ticket->new( $user_a );
@@ -44,7 +44,7 @@ my $tid;
is $ticket->Owner, $user_a->id, 'correct owner';
}
-diag "user B adds a message, we check that user A see notification and can clear it" if $ENV{TEST_VERBOSE};
+diag "user B adds a message, we check that user A see notification and can clear it";
{
my $ticket = RT::Ticket->new( $user_b );
$ticket->Load( $tid );
@@ -62,10 +62,10 @@ diag "user B adds a message, we check that user A see notification and can clear
ok( $reply_id, 'got correspond txn id' );
$agent_a->goto_ticket($tid);
- $agent_a->content_like(qr/bla-bla/ims, 'the message on the page');
+ $agent_a->content_contains('bla-bla', 'the message on the page');
- $agent_a->content_like(
- qr/unread message/ims,
+ $agent_a->content_contains(
+ 'unread message',
'we have not seen something'
);
@@ -76,20 +76,20 @@ diag "user B adds a message, we check that user A see notification and can clear
like( $agent_a->base, qr/#txn-$reply_id$/, 'contains anchor' );
$agent_a->follow_link_ok({text => 'jump to the first unread message and mark all messages as seen'}, 'try to mark all as seen');
- $agent_a->content_like(
- qr/Marked all messages as seen/ims,
+ $agent_a->content_contains(
+ 'Marked all messages as seen',
'see success message'
);
like( $agent_a->base, qr/#txn-$reply_id$/, 'contains anchor' );
- $agent_a->content_like(
- qr/Marked all messages as seen/ims,
+ $agent_a->content_contains(
+ 'Marked all messages as seen',
'see success message'
);
$agent_a->goto_ticket($tid);
- $agent_a->content_unlike(
- qr/unread message/ims,
+ $agent_a->content_lacks(
+ 'unread message',
'we have seen everything, so no messages'
);
}