diff options
author | Perl Tidy <perltidy@bugzilla.org> | 2018-12-05 21:38:52 +0100 |
---|---|---|
committer | Dylan William Hardison <dylan@hardison.net> | 2018-12-05 23:49:08 +0100 |
commit | 8ec8da0491ad89604700b3e29a227966f6d84ba1 (patch) | |
tree | 9d270f173330ca19700e0ba9f2ee931300646de1 /qa/t/webservice_user_offer_account_by_email.t | |
parent | a7bb5a65b71644d9efce5fed783ed545b9336548 (diff) | |
download | bugzilla-8ec8da0491ad89604700b3e29a227966f6d84ba1.tar.gz bugzilla-8ec8da0491ad89604700b3e29a227966f6d84ba1.tar.xz |
no bug - reformat all the code using the new perltidy rules
Diffstat (limited to 'qa/t/webservice_user_offer_account_by_email.t')
-rw-r--r-- | qa/t/webservice_user_offer_account_by_email.t | 65 |
1 files changed, 35 insertions, 30 deletions
diff --git a/qa/t/webservice_user_offer_account_by_email.t b/qa/t/webservice_user_offer_account_by_email.t index e9392bab5..10b5714b2 100644 --- a/qa/t/webservice_user_offer_account_by_email.t +++ b/qa/t/webservice_user_offer_account_by_email.t @@ -20,40 +20,45 @@ my ($config, $xmlrpc, $jsonrpc, $jsonrpc_get) = get_rpc_clients(); use constant INVALID_EMAIL => '()[]\;:,<>@webservice.test'; sub new_login { - return 'requested_' . random_string() . '@webservice.test'; + return 'requested_' . random_string() . '@webservice.test'; } -$jsonrpc_get->bz_call_fail('User.offer_account_by_email', - { email => new_login() }, - 'must use HTTP POST', 'offer_account_by_email fails over GET'); +$jsonrpc_get->bz_call_fail( + 'User.offer_account_by_email', + {email => new_login()}, + 'must use HTTP POST', + 'offer_account_by_email fails over GET' +); # Have to wrap @tests in the foreach so that new_login returns something # different each time. foreach my $rpc ($jsonrpc, $xmlrpc) { - my @tests = ( - # Login name checks. - { args => { }, - error => "argument was not set", - test => 'Leaving out email argument fails', - }, - { args => { email => '' }, - error => "argument was not set", - test => "Passing an empty email argument fails", - }, - { args => { email => INVALID_EMAIL }, - error => "didn't pass our syntax checking", - test => 'Invalid email address fails', - }, - { args => { email => $config->{unprivileged_user_login} }, - error => "There is already an account", - test => 'Trying to use an existing login name fails', - }, - - { args => { email => new_login() }, - test => 'Valid, non-existing email passes.', - }, - ); - - $rpc->bz_run_tests(tests => \@tests, - method => 'User.offer_account_by_email'); + my @tests = ( + + # Login name checks. + { + args => {}, + error => "argument was not set", + test => 'Leaving out email argument fails', + }, + { + args => {email => ''}, + error => "argument was not set", + test => "Passing an empty email argument fails", + }, + { + args => {email => INVALID_EMAIL}, + error => "didn't pass our syntax checking", + test => 'Invalid email address fails', + }, + { + args => {email => $config->{unprivileged_user_login}}, + error => "There is already an account", + test => 'Trying to use an existing login name fails', + }, + + {args => {email => new_login()}, test => 'Valid, non-existing email passes.',}, + ); + + $rpc->bz_run_tests(tests => \@tests, method => 'User.offer_account_by_email'); } |