|
Lines 286-292
subtest 'domain endpoint tests' => sub {
Link Here
|
| 286 |
}; |
286 |
}; |
| 287 |
|
287 |
|
| 288 |
subtest 'oauth login tests' => sub { |
288 |
subtest 'oauth login tests' => sub { |
| 289 |
plan tests => 4; |
289 |
plan tests => 6; |
| 290 |
|
290 |
|
| 291 |
$schema->storage->txn_begin; |
291 |
$schema->storage->txn_begin; |
| 292 |
|
292 |
|
|
Lines 321-326
subtest 'oauth login tests' => sub {
Link Here
|
| 321 |
$t = Test::Mojo->new('Koha::REST::V1'); |
321 |
$t = Test::Mojo->new('Koha::REST::V1'); |
| 322 |
|
322 |
|
| 323 |
$t->get_ok("/api/v1/public/oauth/login/oauth_test/opac")->status_is(302); |
323 |
$t->get_ok("/api/v1/public/oauth/login/oauth_test/opac")->status_is(302); |
|
|
324 |
|
| 325 |
$tx = $t->ua->build_tx( GET => "/api/v1/public/oauth/login/oauth_test/opac" ); |
| 326 |
$tx->req->cookies( { name => 'NOTCGISESSID', value => $session_id } ); |
| 327 |
$tx->req->env( { REMOTE_ADDR => $remote_address } ); |
| 328 |
$t->request_ok($tx)->header_like( |
| 329 |
Location => qr/\?auth_error=No%20user%20session%20found/, |
| 330 |
"Redirect to error when no CGISESSID provided" |
| 331 |
); |
| 332 |
|
| 324 |
$schema->storage->txn_rollback; |
333 |
$schema->storage->txn_rollback; |
| 325 |
}; |
334 |
}; |
| 326 |
|
335 |
|
| 327 |
- |
|
|