[Rt-commit] rt branch, 3.9-trunk, updated. rt-3.8.8-644-gec7d743

Shawn Moore sartak at bestpractical.com
Mon Aug 30 21:03:24 EDT 2010


The branch, 3.9-trunk has been updated
       via  ec7d7435f196fbd950bd7a69f1a2aed3da5e81ab (commit)
       via  78fd41bb36a44b7c1784b1cc4056890604102698 (commit)
       via  8a69c2ec37beef491faef1835aba3b6790e259d8 (commit)
       via  b9e1c7037f076a6622ef86ecb3c8605a7d898a66 (commit)
       via  52b2e985a134877c382d0fb36ef09e6a66ca0eb3 (commit)
       via  875f86c9b1491856828487f175e59698e6871261 (commit)
       via  eeee5d3238e69f7aed8877107fa3bf1530b7e1c3 (commit)
       via  ea810ff51aa68767c9f81e0ea7fd0be5a006d9f0 (commit)
       via  d79e5575af562942a3c9675cd81865cbecf6f039 (commit)
       via  ae55b02c046fc67bd3ec85d17aab1eb9ddb35e12 (commit)
       via  1b8451a2207531ece6827525f34e4585585bfab4 (commit)
       via  363b82fc2c75b53ff10fa1f77271156317e73a79 (commit)
       via  4b70432b09fa8df74993bc6a94528858dfe39879 (commit)
      from  4f37db894b3caead24a4d9ff7181b730b37a11e3 (commit)

Summary of changes:
 ...ditor.original.html => fckeditor.html.original} |    0
 share/html/Widgets/Form/Integer                    |    2 +-
 t/{api/cf.t => customfields/api.t}                 |    0
 .../combo_cascade.t}                               |    0
 .../date_search.t}                                 |    4 +-
 .../datetime_search.t}                             |   10 +++---
 t/{api/cf_external.t => customfields/external.t}   |    0
 t/{api/cf_pattern.t => customfields/pattern.t}     |    0
 .../single_values.t}                               |    0
 .../transaction.t}                                 |    0
 t/mail/crypt-gnupg.t                               |   37 +++++++++++++++++++-
 t/mail/gnupg-reverification.t                      |   28 ++++++++++++++-
 t/mail/sendmail.t                                  |   28 ++++++++------
 t/web/command_line.t                               |    1 +
 t/web/command_line_with_unknown_field.t            |    2 +
 t/web/crypt-gnupg.t                                |   19 +++++++++-
 t/web/gnupg-select-keys-on-create.t                |   16 ++++++++-
 t/web/gnupg-select-keys-on-update.t                |   18 +++++++++-
 18 files changed, 138 insertions(+), 27 deletions(-)
 rename share/html/NoAuth/RichText/FCKeditor/editor/{fckeditor.original.html => fckeditor.html.original} (100%)
 rename t/{api/cf.t => customfields/api.t} (100%)
 rename t/{api/cf_combo_cascade.t => customfields/combo_cascade.t} (100%)
 rename t/{api/cf_date_search.t => customfields/date_search.t} (95%)
 rename t/{api/cf_datetime_search.t => customfields/datetime_search.t} (93%)
 rename t/{api/cf_external.t => customfields/external.t} (100%)
 rename t/{api/cf_pattern.t => customfields/pattern.t} (100%)
 rename t/{api/cf_single_values.t => customfields/single_values.t} (100%)
 rename t/{api/cf_transaction.t => customfields/transaction.t} (100%)

- Log -----------------------------------------------------------------
commit 4b70432b09fa8df74993bc6a94528858dfe39879
Author: Shawn M Moore <sartak at bestpractical.com>
Date:   Sat Aug 28 16:38:45 2010 -0400

    Test most of the reverification warnings

diff --git a/t/mail/gnupg-reverification.t b/t/mail/gnupg-reverification.t
index 9fc9ad3..327916c 100644
--- a/t/mail/gnupg-reverification.t
+++ b/t/mail/gnupg-reverification.t
@@ -2,7 +2,7 @@
 use strict;
 use warnings;
 
-use RT::Test tests => 120;
+use RT::Test tests => 188;
 
 plan skip_all => 'GnuPG required.'
     unless eval 'use GnuPG::Interface; 1';
@@ -74,6 +74,15 @@ foreach my $file ( @files ) {
     );
     $m->content_like(qr/This is .*ID:$eid/ims, "$eid: content is there and message is decrypted");
 
+    $m->next_warning_like(qr/public key not found/);
+
+    # some mails contain multiple signatures
+    if ($eid == 5 || $eid == 17 || $eid == 18) {
+        $m->next_warning_like(qr/public key not found/);
+    }
+
+    $m->no_leftover_warnings_ok;
+
     push @ticket_ids, $id;
 }
 
@@ -88,5 +97,7 @@ foreach my $id ( @ticket_ids ) {
         qr/The signature is good/is,
         "signature is re-verified and now good",
     );
+
+    $m->no_warnings_ok;
 }
 

commit 363b82fc2c75b53ff10fa1f77271156317e73a79
Author: Shawn M Moore <sartak at bestpractical.com>
Date:   Sat Aug 28 16:49:58 2010 -0400

    Test the warnings thrown by mailgate

diff --git a/t/mail/gnupg-reverification.t b/t/mail/gnupg-reverification.t
index 327916c..e2ffbe0 100644
--- a/t/mail/gnupg-reverification.t
+++ b/t/mail/gnupg-reverification.t
@@ -2,7 +2,7 @@
 use strict;
 use warnings;
 
-use RT::Test tests => 188;
+use RT::Test tests => 214;
 
 plan skip_all => 'GnuPG required.'
     unless eval 'use GnuPG::Interface; 1';
@@ -58,10 +58,23 @@ foreach my $file ( @files ) {
     my $email_content = RT::Test->file_content( $file );
     ok $email_content, "$eid: got content of email";
 
-    my ($status, $id) = RT::Test->send_via_mailgate( $email_content );
+    my $warnings;
+    my ($status, $id);
+
+    {
+        local $SIG{__WARN__} = sub {
+            $warnings .= "@_";
+        };
+
+        ($status, $id) = RT::Test->send_via_mailgate( $email_content );
+    }
+
     is $status >> 8, 0, "$eid: the mail gateway exited normally";
     ok $id, "$eid: got id of a newly created ticket - $id";
 
+    like($warnings, qr/Had a problem during decrypting and verifying/);
+    like($warnings, qr/public key not found/);
+
     my $ticket = RT::Ticket->new( $RT::SystemUser );
     $ticket->Load( $id );
     ok $ticket->id, "$eid: loaded ticket #$id";

commit 1b8451a2207531ece6827525f34e4585585bfab4
Author: Shawn M Moore <sartak at bestpractical.com>
Date:   Sat Aug 28 16:54:00 2010 -0400

    Test gnupg-select-keys-on-create.t's warnings

diff --git a/t/web/gnupg-select-keys-on-create.t b/t/web/gnupg-select-keys-on-create.t
index d05c619..42c9e69 100644
--- a/t/web/gnupg-select-keys-on-create.t
+++ b/t/web/gnupg-select-keys-on-create.t
@@ -2,7 +2,7 @@
 use strict;
 use warnings;
 
-use RT::Test tests => 60;
+use RT::Test tests => 78;
 
 plan skip_all => 'GnuPG required.'
     unless eval 'use GnuPG::Interface; 1';
@@ -60,6 +60,7 @@ diag "check that signing doesn't work if there is no key";
         qr/unable to sign outgoing email messages/i,
         'problems with passphrase'
     );
+    $m->warning_like(qr/signing failed: secret key not available/);
 
     my @mail = RT::Test->fetch_caught_mails;
     ok !@mail, 'there are no outgoing emails';
@@ -96,6 +97,9 @@ diag "check that things don't work if there is no key";
 
     my @mail = RT::Test->fetch_caught_mails;
     ok !@mail, 'there are no outgoing emails';
+
+    $m->next_warning_like(qr/public key not found/) for 1 .. 4;
+    $m->no_leftover_warnings_ok;
 }
 
 diag "import first key of rt-test\@example.com";
@@ -143,6 +147,8 @@ diag "check that things still doesn't work if key is not trusted";
 
     my @mail = RT::Test->fetch_caught_mails;
     ok !@mail, 'there are no outgoing emails';
+
+    $m->no_warnings_ok;
 }
 
 diag "import a second key of rt-test\@example.com";
@@ -190,6 +196,8 @@ diag "check that things still doesn't work if two keys are not trusted";
 
     my @mail = RT::Test->fetch_caught_mails;
     ok !@mail, 'there are no outgoing emails';
+
+    $m->no_warnings_ok;
 }
 
 {
@@ -224,6 +232,8 @@ diag "check that we see key selector even if only one key is trusted but there a
 
     my @mail = RT::Test->fetch_caught_mails;
     ok !@mail, 'there are no outgoing emails';
+
+    $m->no_warnings_ok;
 }
 
 diag "check that key selector works and we can select trusted key";
@@ -256,6 +266,8 @@ diag "check that key selector works and we can select trusted key";
     my @mail = RT::Test->fetch_caught_mails;
     ok @mail, 'there are some emails';
     check_text_emails( { Encrypt => 1 }, @mail );
+
+    $m->no_warnings_ok;
 }
 
 diag "check encrypting of attachments";
@@ -289,6 +301,8 @@ diag "check encrypting of attachments";
     my @mail = RT::Test->fetch_caught_mails;
     ok @mail, 'there are some emails';
     check_text_emails( { Encrypt => 1, Attachment => 1 }, @mail );
+
+    $m->no_warnings_ok;
 }
 
 sub check_text_emails {

commit ae55b02c046fc67bd3ec85d17aab1eb9ddb35e12
Author: Shawn M Moore <sartak at bestpractical.com>
Date:   Sat Aug 28 17:00:06 2010 -0400

    test t/web/gnupg-select-keys-on-update.t's warnings

diff --git a/t/web/gnupg-select-keys-on-update.t b/t/web/gnupg-select-keys-on-update.t
index ea4b577..c9f4cbc 100644
--- a/t/web/gnupg-select-keys-on-update.t
+++ b/t/web/gnupg-select-keys-on-update.t
@@ -2,7 +2,7 @@
 use strict;
 use warnings;
 
-use RT::Test tests => 68;
+use RT::Test tests => 85;
 
 plan skip_all => 'GnuPG required.'
     unless eval 'use GnuPG::Interface; 1';
@@ -75,6 +75,9 @@ diag "check that signing doesn't work if there is no key";
 
     my @mail = RT::Test->fetch_caught_mails;
     ok !@mail, 'there are no outgoing emails';
+
+    $m->next_warning_like(qr/secret key not available/);
+    $m->no_leftover_warnings_ok;
 }
 
 {
@@ -109,6 +112,9 @@ diag "check that things don't work if there is no key";
 
     my @mail = RT::Test->fetch_caught_mails;
     ok !@mail, 'there are no outgoing emails';
+
+    $m->next_warning_like(qr/public key not found/) for 1 .. 2;
+    $m->no_leftover_warnings_ok;
 }
 
 
@@ -158,6 +164,8 @@ diag "check that things still doesn't work if key is not trusted";
 
     my @mail = RT::Test->fetch_caught_mails;
     ok !@mail, 'there are no outgoing emails';
+
+    $m->no_warnings_ok;
 }
 
 diag "import a second key of rt-test\@example.com";
@@ -206,6 +214,8 @@ diag "check that things still doesn't work if two keys are not trusted";
 
     my @mail = RT::Test->fetch_caught_mails;
     ok !@mail, 'there are no outgoing emails';
+
+    $m->no_warnings_ok;
 }
 
 {
@@ -241,6 +251,8 @@ diag "check that we see key selector even if only one key is trusted but there a
 
     my @mail = RT::Test->fetch_caught_mails;
     ok !@mail, 'there are no outgoing emails';
+
+    $m->no_warnings_ok;
 }
 
 diag "check that key selector works and we can select trusted key";
@@ -274,6 +286,8 @@ diag "check that key selector works and we can select trusted key";
     my @mail = RT::Test->fetch_caught_mails;
     ok @mail, 'there are some emails';
     check_text_emails( { Encrypt => 1 }, @mail );
+
+    $m->no_warnings_ok;
 }
 
 diag "check encrypting of attachments";
@@ -308,6 +322,8 @@ diag "check encrypting of attachments";
     my @mail = RT::Test->fetch_caught_mails;
     ok @mail, 'there are some emails';
     check_text_emails( { Encrypt => 1, Attachment => 1 }, @mail );
+
+    $m->no_warnings_ok;
 }
 
 sub check_text_emails {

commit d79e5575af562942a3c9675cd81865cbecf6f039
Author: Shawn M Moore <sartak at bestpractical.com>
Date:   Sat Aug 28 17:02:55 2010 -0400

    Test one of the t/web/crypt-gnupg.t warnings

diff --git a/t/web/crypt-gnupg.t b/t/web/crypt-gnupg.t
index fb28c88..de75f58 100644
--- a/t/web/crypt-gnupg.t
+++ b/t/web/crypt-gnupg.t
@@ -1,7 +1,7 @@
 #!/usr/bin/perl -w
 use strict;
 
-use RT::Test tests => 94;
+use RT::Test tests => 95;
 
 plan skip_all => 'GnuPG required.'
     unless eval 'use GnuPG::Interface; 1';
@@ -379,9 +379,18 @@ To: general\@example.com
 hello
 MAIL
  
-((my $status), $id) = RT::Test->send_via_mailgate($mail);
+my ($warnings, $status);
+{
+    local $SIG{__WARN__} = sub {
+        $warnings .= "@_";
+    };
+
+    ($status, $id) = RT::Test->send_via_mailgate($mail);
+}
+
 is ($status >> 8, 0, "The mail gateway exited normally");
 ok ($id, "got id of a newly created ticket - $id");
+like($warnings, qr/nokey\@example.com: skipped: public key not found/);
 
 $tick = RT::Ticket->new( $RT::SystemUser );
 $tick->Load( $id );

commit ea810ff51aa68767c9f81e0ea7fd0be5a006d9f0
Author: Shawn M Moore <sartak at bestpractical.com>
Date:   Sat Aug 28 17:10:15 2010 -0400

    Test t/mail/crypt-gnupg.t's warnings

diff --git a/t/mail/crypt-gnupg.t b/t/mail/crypt-gnupg.t
index 0356099..1405f13 100644
--- a/t/mail/crypt-gnupg.t
+++ b/t/mail/crypt-gnupg.t
@@ -3,7 +3,7 @@
 use strict;
 use warnings;
 
-use RT::Test nodata => 1, tests => 92;
+use RT::Test nodata => 1, tests => 97;
 plan skip_all => 'GnuPG required.'
     unless eval 'use GnuPG::Interface; 1';
 plan skip_all => 'gpg executable is required.'
@@ -69,6 +69,11 @@ diag 'only signing. correct passphrase';
 
 diag 'only signing. missing passphrase';
 {
+    my $warnings;
+    local $SIG{__WARN__} = sub {
+        $warnings .= "@_";
+    };
+
     my $entity = MIME::Entity->build(
         From    => 'rt at example.com',
         Subject => 'test',
@@ -82,10 +87,17 @@ diag 'only signing. missing passphrase';
     is( scalar @status, 1, 'one record');
     is( $status[0]->{'Operation'}, 'PassphraseCheck', 'operation is correct');
     is( $status[0]->{'Status'}, 'MISSING', 'missing passphrase');
+
+    like($warnings, qr/bad passphrase/);
 }
 
 diag 'only signing. wrong passphrase';
 {
+    my $warnings;
+    local $SIG{__WARN__} = sub {
+        $warnings .= "@_";
+    };
+
     my $entity = MIME::Entity->build(
         From    => 'rt at example.com',
         Subject => 'test',
@@ -99,6 +111,8 @@ diag 'only signing. wrong passphrase';
     is( scalar @status, 1, 'one record');
     is( $status[0]->{'Operation'}, 'PassphraseCheck', 'operation is correct');
     is( $status[0]->{'Status'}, 'BAD', 'wrong passphrase');
+
+    like($warnings, qr/bad passphrase/);
 }
 
 diag 'encryption only';
@@ -129,6 +143,11 @@ diag 'encryption only';
 
 diag 'encryption only, bad recipient';
 {
+    my $warnings;
+    local $SIG{__WARN__} = sub {
+        $warnings .= "@_";
+    };
+
     my $entity = MIME::Entity->build(
         From    => 'rt at example.com',
         To      => 'keyless at example.com',
@@ -142,6 +161,8 @@ diag 'encryption only, bad recipient';
     my @status = RT::Crypt::GnuPG::ParseStatus( $res{'status'} );
     is( scalar @status, 1, 'one record');
     is( $status[0]->{'Keyword'}, 'INV_RECP', 'invalid recipient');
+
+    like($warnings, qr/public key not found/);
 }
 
 diag 'encryption and signing with combined method';
@@ -221,6 +242,11 @@ diag 'find signed/encrypted part deep inside';
 
 diag 'wrong signed/encrypted parts: no protocol';
 {
+    my $warnings;
+    local $SIG{__WARN__} = sub {
+        $warnings .= "@_";
+    };
+
     my $entity = MIME::Entity->build(
         From    => 'rt at example.com',
         To      => 'rt at example.com',
@@ -233,10 +259,17 @@ diag 'wrong signed/encrypted parts: no protocol';
 
     my @parts = RT::Crypt::GnuPG::FindProtectedParts( Entity => $entity );
     is( scalar @parts, 0, 'no protected parts' );
+
+    like($warnings, qr{Entity is 'multipart/encrypted', but has no protocol defined. Skipped});
 }
 
 diag 'wrong signed/encrypted parts: not enought parts';
 {
+    my $warnings;
+    local $SIG{__WARN__} = sub {
+        $warnings .= "@_";
+    };
+
     my $entity = MIME::Entity->build(
         From    => 'rt at example.com',
         To      => 'rt at example.com',
@@ -249,6 +282,8 @@ diag 'wrong signed/encrypted parts: not enought parts';
 
     my @parts = RT::Crypt::GnuPG::FindProtectedParts( Entity => $entity );
     is( scalar @parts, 0, 'no protected parts' );
+
+    like($warnings, qr/Encrypted or signed entity must has two subparts. Skipped/);
 }
 
 diag 'wrong signed/encrypted parts: wrong proto';

commit eeee5d3238e69f7aed8877107fa3bf1530b7e1c3
Author: Shawn M Moore <sartak at bestpractical.com>
Date:   Sat Aug 28 17:44:37 2010 -0400

    Rename the original fckeditor.html so it doesn't get caught by compilation-errors.t
    
        Looks like it's there purely for reference

diff --git a/share/html/NoAuth/RichText/FCKeditor/editor/fckeditor.original.html b/share/html/NoAuth/RichText/FCKeditor/editor/fckeditor.html.original
similarity index 100%
rename from share/html/NoAuth/RichText/FCKeditor/editor/fckeditor.original.html
rename to share/html/NoAuth/RichText/FCKeditor/editor/fckeditor.html.original

commit 875f86c9b1491856828487f175e59698e6871261
Author: Shawn M Moore <sartak at bestpractical.com>
Date:   Mon Aug 30 13:05:20 2010 -0400

    t/web/crypt-gnupg.t: Test for warnings

diff --git a/t/web/crypt-gnupg.t b/t/web/crypt-gnupg.t
index de75f58..56fbad1 100644
--- a/t/web/crypt-gnupg.t
+++ b/t/web/crypt-gnupg.t
@@ -1,7 +1,7 @@
 #!/usr/bin/perl -w
 use strict;
 
-use RT::Test tests => 95;
+use RT::Test tests => 101;
 
 plan skip_all => 'GnuPG required.'
     unless eval 'use GnuPG::Interface; 1';
@@ -432,6 +432,8 @@ like($m->content, qr/$key2/, "second key shows up in preferences");
 like($m->content, qr/$key1/, "first key shows up in preferences");
 like($m->content, qr/$key2.*?$key1/s, "second key (now preferred) shows up before the first");
 
+$m->no_warnings_ok;
+
 # test that the new fields work
 $m->get("$baseurl/Search/Simple.html?q=General");
 my $content = $m->content;
@@ -450,6 +452,10 @@ like($content, qr/KO-nokey \(no pubkey!\)-K/, "KeyOwnerName issues no-pubkey war
 like($content, qr/KO-Nobody \(no pubkey!\)-K/, "KeyOwnerName issues no-pubkey warning for nobody");
 
 like($content, qr/KR-recipient\@example.com-K/, "KeyRequestors does not issue no-pubkey warning for recipient\@example.com");
+
 like($content, qr/KR-general\@example.com-K/, "KeyRequestors does not issue no-pubkey warning for general\@example.com");
 like($content, qr/KR-nokey\@example.com \(no pubkey!\)-K/, "KeyRequestors DOES issue no-pubkey warning for nokey\@example.com");
 
+$m->next_warning_like(qr/public key not found/);
+$m->next_warning_like(qr/public key not found/);
+$m->no_leftover_warnings_ok;

commit 52b2e985a134877c382d0fb36ef09e6a66ca0eb3
Author: Shawn M Moore <sartak at bestpractical.com>
Date:   Mon Aug 30 14:02:19 2010 -0400

    Avoid undef warning in /Widgets/Form/Integer's loc()

diff --git a/share/html/Widgets/Form/Integer b/share/html/Widgets/Form/Integer
index a5641f6..b5050f6 100644
--- a/share/html/Widgets/Form/Integer
+++ b/share/html/Widgets/Form/Integer
@@ -68,7 +68,7 @@ $CurrentValue => '',
 
 $Default        => 0,
 $DefaultValue   => 0,
-$DefaultLabel   => loc( 'Default: [_1]', $DefaultValue ),
+$DefaultLabel   => loc( 'Default: [_1]', $DefaultValue || '' ),
 </%ARGS>
 
 <%METHOD InputOnly>

commit b9e1c7037f076a6622ef86ecb3c8605a7d898a66
Author: Shawn M Moore <sartak at bestpractical.com>
Date:   Mon Aug 30 14:07:35 2010 -0400

    Avoid weird exit values caused by expect_quit

diff --git a/t/web/command_line.t b/t/web/command_line.t
index d32677a..d1eb9d1 100644
--- a/t/web/command_line.t
+++ b/t/web/command_line.t
@@ -540,3 +540,4 @@ sub check_attachment {
     }
 }
 
+1; # needed to avoid a weird exit value from expect_quit
diff --git a/t/web/command_line_with_unknown_field.t b/t/web/command_line_with_unknown_field.t
index 9a7ec7a..1f87cb8 100644
--- a/t/web/command_line_with_unknown_field.t
+++ b/t/web/command_line_with_unknown_field.t
@@ -32,3 +32,5 @@ expect_like(qr/homer: Unknown field/, 'homer is unknown field');
 expect_like(qr/homer: simpson/, 'the value we set for homer is shown too');
 
 expect_quit();
+
+1; # needed to avoid a weird exit value from expect_quit

commit 8a69c2ec37beef491faef1835aba3b6790e259d8
Author: Shawn M Moore <sartak at bestpractical.com>
Date:   Mon Aug 30 14:15:05 2010 -0400

    Noon causes a spurious warning in Time::ParseDate ([rt.cpan.org #60705])

diff --git a/t/api/cf_date_search.t b/t/api/cf_date_search.t
index aea2925..6039fd0 100644
--- a/t/api/cf_date_search.t
+++ b/t/api/cf_date_search.t
@@ -109,9 +109,9 @@ ok(
     $ticket->Create(
         Queue                    => $q->id,
         Subject                  => 'Test',
-        'CustomField-' . $cf->id => '2010-05-04 12:34:56',
+        'CustomField-' . $cf->id => '2010-05-04 11:34:56',
     ),
-    'create ticket with cf set to 2010-05-04 12:34:56'
+    'create ticket with cf set to 2010-05-04 11:34:56'
 );
 
 is( $ticket->CustomFieldValues->First->Content,
diff --git a/t/api/cf_datetime_search.t b/t/api/cf_datetime_search.t
index 44582e1..cc2915c 100644
--- a/t/api/cf_datetime_search.t
+++ b/t/api/cf_datetime_search.t
@@ -27,14 +27,14 @@ ok(
     $ticket->Create(
         Queue                    => $q->id,
         Subject                  => 'Test',
-        'CustomField-' . $cf->id => '2010-05-04 08:00:00',
+        'CustomField-' . $cf->id => '2010-05-04 07:00:00',
     ),
-    'create ticket with cf set to 2010-05-04 08:00:00( 2010-05-04 12:00:00 with UTC )'
+    'create ticket with cf set to 2010-05-04 07:00:00( 2010-05-04 11:00:00 with UTC )'
 );
 
 is(
     $ticket->CustomFieldValues->First->Content,
-    '2010-05-04 12:00:00',
+    '2010-05-04 11:00:00',
     'date in db is in timezone UTC'
 );
 
@@ -44,10 +44,10 @@ is(
     $tickets->LimitCustomField(
         CUSTOMFIELD => $cf->id,
         OPERATOR    => '=',
-        VALUE       => '2010-05-04 12:00:00',    # this timezone is UTC
+        VALUE       => '2010-05-04 11:00:00',    # this timezone is UTC
     );
 
-    is( $tickets->Count, 1, 'found the ticket with exact date: 2010-05-04 12:00:00' );
+    is( $tickets->Count, 1, 'found the ticket with exact date: 2010-05-04 11:00:00' );
 }
 
 {

commit 78fd41bb36a44b7c1784b1cc4056890604102698
Author: Shawn M Moore <sartak at bestpractical.com>
Date:   Mon Aug 30 14:21:52 2010 -0400

    We now have a t/customfields subdir, so use it

diff --git a/t/api/cf.t b/t/customfields/api.t
similarity index 100%
rename from t/api/cf.t
rename to t/customfields/api.t
diff --git a/t/api/cf_combo_cascade.t b/t/customfields/combo_cascade.t
similarity index 100%
rename from t/api/cf_combo_cascade.t
rename to t/customfields/combo_cascade.t
diff --git a/t/api/cf_date_search.t b/t/customfields/date_search.t
similarity index 100%
rename from t/api/cf_date_search.t
rename to t/customfields/date_search.t
diff --git a/t/api/cf_datetime_search.t b/t/customfields/datetime_search.t
similarity index 100%
rename from t/api/cf_datetime_search.t
rename to t/customfields/datetime_search.t
diff --git a/t/api/cf_external.t b/t/customfields/external.t
similarity index 100%
rename from t/api/cf_external.t
rename to t/customfields/external.t
diff --git a/t/api/cf_pattern.t b/t/customfields/pattern.t
similarity index 100%
rename from t/api/cf_pattern.t
rename to t/customfields/pattern.t
diff --git a/t/api/cf_single_values.t b/t/customfields/single_values.t
similarity index 100%
rename from t/api/cf_single_values.t
rename to t/customfields/single_values.t
diff --git a/t/api/cf_transaction.t b/t/customfields/transaction.t
similarity index 100%
rename from t/api/cf_transaction.t
rename to t/customfields/transaction.t

commit ec7d7435f196fbd950bd7a69f1a2aed3da5e81ab
Author: Shawn M Moore <sartak at bestpractical.com>
Date:   Mon Aug 30 14:44:50 2010 -0400

    Turn this decode_base64 weirdness into a real failing test

diff --git a/t/mail/sendmail.t b/t/mail/sendmail.t
index 06925ef..5612cbb 100644
--- a/t/mail/sendmail.t
+++ b/t/mail/sendmail.t
@@ -3,7 +3,7 @@
 use strict;
 use File::Spec ();
 
-use RT::Test tests => 137;
+use RT::Test tests => 138;
 
 use RT::EmailParser;
 use RT::Tickets;
@@ -406,17 +406,21 @@ is (count_attachs($tick) , 5 , "Has one attachment, presumably a text-plain and
 sub text_plain_nested_redef_sendmessage {
     no warnings qw/redefine/;
     eval 'sub RT::Action::SendEmail::SendMessage { 
-                my $self = shift; 
-                my $MIME = shift; 
-                return (1) unless ($self->ScripObj->ScripActionObj->Name eq "Notify AdminCcs" );
-                is ($MIME->head->mime_type , "multipart/mixed", "It is a mixed multipart");
-                 my $subject  =  $MIME->head->get("subject");
-                 $subject  = MIME::Base64::decode_base64( $subject);
-                chomp($subject);
-                # TODO, why does this test fail
-                #ok($subject =~ /Niv\x{e5}er/, "The subject matches the word - $subject");
-                1;
-                 }';
+        my $self = shift;
+        my $MIME = shift;
+
+        return (1) unless ($self->ScripObj->ScripActionObj->Name eq "Notify AdminCcs" );
+
+        is ($MIME->head->mime_type , "multipart/mixed", "It is a mixed multipart");
+
+        my $encoded_subject = $MIME->head->get("subject");
+        warn "<$encoded_subject>";
+        my $subject = MIME::Base64::decode_base64($encoded_subject);
+
+        like($subject, qr/Niv\x{e5}er/, "The subject matches the word - $subject");
+
+        1;
+    }';
 }
 
 # }}}

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


More information about the Rt-commit mailing list