From d9f2b256eef8179b62dd901632a6fa24df68e649 Mon Sep 17 00:00:00 2001 From: Tomas Cohen Arazi Date: Mon, 13 Feb 2023 11:54:07 -0300 Subject: [PATCH] Bug 32942: Regression tests Having a custom status shouldn't cause issues Signed-off-by: Tomas Cohen Arazi --- t/db_dependent/api/v1/suggestions.t | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/t/db_dependent/api/v1/suggestions.t b/t/db_dependent/api/v1/suggestions.t index 9ad51e27bc2..87793a44de9 100755 --- a/t/db_dependent/api/v1/suggestions.t +++ b/t/db_dependent/api/v1/suggestions.t @@ -97,7 +97,7 @@ subtest 'list() tests' => sub { subtest 'get() tests' => sub { - plan tests => 8; + plan tests => 11; $schema->storage->txn_begin; @@ -133,6 +133,12 @@ subtest 'get() tests' => sub { "//$userid:$password@/api/v1/suggestions/" . $suggestion->id ) ->status_is(200)->json_is( $suggestion->to_api ); + $suggestion->STATUS('FREDERIC')->store->discard_changes; + + $t->get_ok( "//$userid:$password@/api/v1/suggestions/" . $suggestion->id ) + ->status_is(200) + ->json_is( $suggestion->to_api ); + $t->get_ok( "//$unauth_userid:$password@/api/v1/suggestions/" . $suggestion->id )->status_is(403); -- 2.39.1