Bug 42719: (QA follow-up) Adjust tests

This patch makes the tests reflect the design decision made on the bug report.
The author for the original 'No CGISESSID then error' patch signed off on this
so I'm confident this is the right thing to do.

Signed-off-by: Tomás Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Pedro Amorim <pedro.amorim@openfifth.co.uk>
This commit is contained in:
Tomás Cohen Arazi 2026-09-30 11:41:21 -03:00 committed by Pedro Amorim
parent 9f50aa9862
commit d1f8d5bbd2
No known key found for this signature in database
GPG Key ID: 06B75BA7F3894D55
1 changed files with 1 additions and 9 deletions

View File

@ -286,7 +286,7 @@ subtest 'domain endpoint tests' => sub {
};
subtest 'oauth login tests' => sub {
plan tests => 6;
plan tests => 4;
$schema->storage->txn_begin;
@ -322,14 +322,6 @@ subtest 'oauth login tests' => sub {
$t->get_ok("/api/v1/public/oauth/login/oauth_test/opac")->status_is(302);
$tx = $t->ua->build_tx( GET => "/api/v1/public/oauth/login/oauth_test/opac" );
$tx->req->cookies( { name => 'NOTCGISESSID', value => $session_id } );
$tx->req->env( { REMOTE_ADDR => $remote_address } );
$t->request_ok($tx)->header_like(
Location => qr/\?auth_error=No%20user%20session%20found/,
"Redirect to error when no CGISESSID provided"
);
$schema->storage->txn_rollback;
};