summaryrefslogtreecommitdiffstats
path: root/extensions/BMO/t
diff options
context:
space:
mode:
authorPerl Tidy <perltidy@bugzilla.org>2018-12-05 21:38:52 +0100
committerDylan William Hardison <dylan@hardison.net>2018-12-05 23:49:08 +0100
commit8ec8da0491ad89604700b3e29a227966f6d84ba1 (patch)
tree9d270f173330ca19700e0ba9f2ee931300646de1 /extensions/BMO/t
parenta7bb5a65b71644d9efce5fed783ed545b9336548 (diff)
downloadbugzilla-8ec8da0491ad89604700b3e29a227966f6d84ba1.tar.gz
bugzilla-8ec8da0491ad89604700b3e29a227966f6d84ba1.tar.xz
no bug - reformat all the code using the new perltidy rules
Diffstat (limited to 'extensions/BMO/t')
-rw-r--r--extensions/BMO/t/bounty_attachment.t93
1 files changed, 58 insertions, 35 deletions
diff --git a/extensions/BMO/t/bounty_attachment.t b/extensions/BMO/t/bounty_attachment.t
index 6e596eeba..61552c074 100644
--- a/extensions/BMO/t/bounty_attachment.t
+++ b/extensions/BMO/t/bounty_attachment.t
@@ -13,46 +13,69 @@ use Test::More;
use Bugzilla;
BEGIN { Bugzilla->extensions }
-my $class = 'Bugzilla::Extension::BMO';
+my $class = 'Bugzilla::Extension::BMO';
my $parse = $class->can('parse_bounty_attachment_description');
my $format = $class->can('format_bounty_attachment_description');
ok($parse, "got the function");
my $bughunter = $parse->('bughunter@hacker.org, , 2014-06-25, , ,false');
-is_deeply({ reporter_email => 'bughunter@hacker.org',
- amount_paid => '',
- reported_date => '2014-06-25',
- fixed_date => '',
- awarded_date => '',
- publish => 0,
- credit => []}, $bughunter);
-
-my $hfli = $parse->('hfli@fortinet.com, 1000, 2010-07-16, 2010-08-04, 2011-06-15, true, Fortiguard Labs');
-is_deeply({ reporter_email => 'hfli@fortinet.com',
- amount_paid => '1000',
- reported_date => '2010-07-16',
- fixed_date => '2010-08-04',
- awarded_date => '2011-06-15',
- publish => 1,
- credit => ['Fortiguard Labs']}, $hfli);
-
-is('batman@justiceleague.america,1000,2015-01-01,2015-02-02,2015-03-03,true,JLA,Wayne Industries,Test',
- $format->({ reporter_email => 'batman@justiceleague.america',
- amount_paid => 1000,
- reported_date => '2015-01-01',
- fixed_date => '2015-02-02',
- awarded_date => '2015-03-03',
- publish => 1,
- credit => ['JLA', 'Wayne Industries', 'Test'] }));
-
-my $dylan = $parse->('dylan@hardison.net,2,2014-09-23,2014-09-24,2014-09-25,true,Foo bar,Bork,');
-is_deeply({ reporter_email => 'dylan@hardison.net',
- amount_paid => 2,
- reported_date => '2014-09-23',
- fixed_date => '2014-09-24',
- awarded_date => '2014-09-25',
- publish => 1,
- credit => ['Foo bar', 'Bork']}, $dylan);
+is_deeply(
+ {
+ reporter_email => 'bughunter@hacker.org',
+ amount_paid => '',
+ reported_date => '2014-06-25',
+ fixed_date => '',
+ awarded_date => '',
+ publish => 0,
+ credit => []
+ },
+ $bughunter
+);
+
+my $hfli
+ = $parse->(
+ 'hfli@fortinet.com, 1000, 2010-07-16, 2010-08-04, 2011-06-15, true, Fortiguard Labs'
+ );
+is_deeply(
+ {
+ reporter_email => 'hfli@fortinet.com',
+ amount_paid => '1000',
+ reported_date => '2010-07-16',
+ fixed_date => '2010-08-04',
+ awarded_date => '2011-06-15',
+ publish => 1,
+ credit => ['Fortiguard Labs']
+ },
+ $hfli
+);
+
+is(
+ 'batman@justiceleague.america,1000,2015-01-01,2015-02-02,2015-03-03,true,JLA,Wayne Industries,Test',
+ $format->({
+ reporter_email => 'batman@justiceleague.america',
+ amount_paid => 1000,
+ reported_date => '2015-01-01',
+ fixed_date => '2015-02-02',
+ awarded_date => '2015-03-03',
+ publish => 1,
+ credit => ['JLA', 'Wayne Industries', 'Test']
+ })
+);
+
+my $dylan = $parse->(
+ 'dylan@hardison.net,2,2014-09-23,2014-09-24,2014-09-25,true,Foo bar,Bork,');
+is_deeply(
+ {
+ reporter_email => 'dylan@hardison.net',
+ amount_paid => 2,
+ reported_date => '2014-09-23',
+ fixed_date => '2014-09-24',
+ awarded_date => '2014-09-25',
+ publish => 1,
+ credit => ['Foo bar', 'Bork']
+ },
+ $dylan
+);
done_testing;