From: dklawren Date: Thu, 25 Oct 2018 22:05:50 +0000 (-0400) Subject: Bug 1502181 - MockParams should set user/verify authentication classes to match produ... X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=bc9c7a2b1d584f506c27d24f8088175396b98240;p=thirdparty%2Fbugzilla.git Bug 1502181 - MockParams should set user/verify authentication classes to match production --- diff --git a/Bugzilla/Test/MockParams.pm b/Bugzilla/Test/MockParams.pm index 2d064c616..ca582a5a1 100644 --- a/Bugzilla/Test/MockParams.pm +++ b/Bugzilla/Test/MockParams.pm @@ -58,6 +58,10 @@ sub import { ], ); + # prod-like defaults + $answers{user_info_class} //= 'GitHubAuth,CGI'; + $answers{user_verify_class} //= 'GitHubAuth,DB'; + if ($first_time++) { capture_merged { Bugzilla::Config::update_params(); @@ -68,4 +72,4 @@ sub import { } } -1; \ No newline at end of file +1; diff --git a/t/mojo-example.t b/t/mojo-example.t index 8ed4835da..3858025a7 100644 --- a/t/mojo-example.t +++ b/t/mojo-example.t @@ -69,8 +69,8 @@ $t->json_is('/id' => $api_user->id); # Each time you call $t->get_ok, post_ok, etc the previous request is cleared. $t->get_ok('/rest/whoami'); -$t->status_is(200); -$t->json_is('/name' => ''); -$t->json_is('/id' => 0); +$t->status_is(401); +$t->json_is('/name' => undef); +$t->json_is('/id' => undef); done_testing;