Lines 97-103
subtest 'list() tests' => sub {
Link Here
|
97 |
|
97 |
|
98 |
subtest 'get() tests' => sub { |
98 |
subtest 'get() tests' => sub { |
99 |
|
99 |
|
100 |
plan tests => 8; |
100 |
plan tests => 11; |
101 |
|
101 |
|
102 |
$schema->storage->txn_begin; |
102 |
$schema->storage->txn_begin; |
103 |
|
103 |
|
Lines 133-138
subtest 'get() tests' => sub {
Link Here
|
133 |
"//$userid:$password@/api/v1/suggestions/" . $suggestion->id ) |
133 |
"//$userid:$password@/api/v1/suggestions/" . $suggestion->id ) |
134 |
->status_is(200)->json_is( $suggestion->to_api ); |
134 |
->status_is(200)->json_is( $suggestion->to_api ); |
135 |
|
135 |
|
|
|
136 |
$suggestion->STATUS('FREDERIC')->store->discard_changes; |
137 |
|
138 |
$t->get_ok( "//$userid:$password@/api/v1/suggestions/" . $suggestion->id ) |
139 |
->status_is(200) |
140 |
->json_is( $suggestion->to_api ); |
141 |
|
136 |
$t->get_ok( "//$unauth_userid:$password@/api/v1/suggestions/" |
142 |
$t->get_ok( "//$unauth_userid:$password@/api/v1/suggestions/" |
137 |
. $suggestion->id )->status_is(403); |
143 |
. $suggestion->id )->status_is(403); |
138 |
|
144 |
|
139 |
- |
|
|