[Bps-public-commit] SD - A distributed issue tracker branch, master, updated. 900f58dcc2bf90ab609fff39abb513052f4bd473

spang at bestpractical.com spang at bestpractical.com
Thu Jan 22 08:59:19 EST 2009


The branch, master has been updated
       via  900f58dcc2bf90ab609fff39abb513052f4bd473 (commit)
      from  b50a9e7f7f70269c7c421b5ba4440877acc4f6f3 (commit)

Summary of changes:
 t/sd-log.t |   30 +++++++++++++++++++++++-------
 1 files changed, 23 insertions(+), 7 deletions(-)

- Log -----------------------------------------------------------------
commit 900f58dcc2bf90ab609fff39abb513052f4bd473
Author: Christine Spang <spang at bestpractical.com>
Date:   Thu Jan 22 15:58:37 2009 +0200

    some more log tests

diff --git a/t/sd-log.t b/t/sd-log.t
index df4d605..e722b02 100644
--- a/t/sd-log.t
+++ b/t/sd-log.t
@@ -2,7 +2,7 @@
 
 use strict;
 
-use Prophet::Test tests => 2;
+use Prophet::Test tests => 4;
 use App::SD::Test;
 use Prophet::Util;
 no warnings 'once';
@@ -20,10 +20,6 @@ run_script( 'sd', [ 'init']);
 
 my $replica_uuid = replica_uuid;
 
-# args for the log command: --last, --count
-# count does: specifies the number of log entries to output
-# last does: specifies the last entry that you want shown (newest entry is default)
-
 # create a ticket
 my ($log_id, $log_uuid) = create_ticket_ok( '--', 'summary', 'logs rock!');
 # check the log
@@ -43,10 +39,30 @@ run_output_matches( 'sd', [ 'log', '--count', '1' ],
         '',
     ], [], "log output is correct",
 );
-# delete a prop
+# change a prop
+run_output_matches( 'sd', [ 'ticket',  
+    'update', '--uuid', $log_uuid, '--', '--reporter', 'foo at bar.com',
+    ],
+    [qr/Ticket $log_id \($log_uuid\) updated/], #stdout
+   [], # stderr
+   "deleting a prop went ok",
+);
 # check the log
+run_output_matches( 'sd', [ 'log', '--count', '1' ],
+    [
+        qr/^\d{4}-\d{2}-\d{2}.+ - $ENV{USER} @ $replica_uuid$/,
+        qr/^ # Ticket \d+ \(logs rock!\)$/,
+        '  > "reporter" changed from "'.$ENV{EMAIL}.'" to "foo at bar.com".',
+        '',
+    ], [], "log output is correct",
+);
 
-# change a prop
+# delete a prop XXX delete is currently implemented only as setting a prop
+# to '', so it will never actually show up in the log as deleted
 # check the log
 
 # check the log specifying --count --last
+# args for the log command: --last, --count
+# count does: specifies the number of log entries to output
+# last does: specifies the last entry that you want shown (newest entry is default)
+

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



More information about the Bps-public-commit mailing list