Bug 32942: (QA follow-up) Fix regression test

With the move to checking status during store, we broke the api
regression test introduced earlier in the patch set.

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 8eb27c40e6)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 6444a30adc)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
This commit is contained in:
Martin Renvoize 2023-09-18 12:59:50 +01:00 committed by Matt Blenkinsop
parent b735d4ad66
commit e03747678b
1 changed files with 6 additions and 0 deletions

View File

@ -133,6 +133,12 @@ subtest 'get() tests' => sub {
"//$userid:$password@/api/v1/suggestions/" . $suggestion->id )
->status_is(200)->json_is( $suggestion->to_api );
my $authorised_value = Koha::AuthorisedValue->new(
{
category => 'SUGGEST_STATUS',
authorised_value => 'FREDERIC'
}
)->store;
$suggestion->STATUS('FREDERIC')->store->discard_changes;
$t->get_ok( "//$userid:$password@/api/v1/suggestions/" . $suggestion->id )->status_is(200)