]> git.ipfire.org Git - thirdparty/bugzilla.git/commitdiff
Bug 1502181 - MockParams should set user/verify authentication classes to match produ...
authordklawren <dklawren@users.noreply.github.com>
Thu, 25 Oct 2018 22:05:50 +0000 (18:05 -0400)
committerGitHub <noreply@github.com>
Thu, 25 Oct 2018 22:05:50 +0000 (18:05 -0400)
Bugzilla/Test/MockParams.pm
t/mojo-example.t

index 2d064c61639651a10f1ba7136b99c38f936cd93f..ca582a5a17bd9eabd3e83c7465a99a9f900eb635 100644 (file)
@@ -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;
index 8ed4835dae79d39cc0fb2db362cb1ecfce9c6b2d..3858025a7ad52e47079401b7b72bc596f0a4c0ba 100644 (file)
@@ -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;