Bug 32942: Regression tests
Having a custom status shouldn't cause issues
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit e13f68965e
)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
This commit is contained in:
parent
48ebd5a803
commit
585a816aff
1 changed files with 6 additions and 1 deletions
|
@ -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,11 @@ 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);
|
||||
|
||||
|
|
Loading…
Reference in a new issue