Bug 37508: Test for errors when returning an aliased password column
Signed-off-by: David Cook <dcook@prosentient.com.au> Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
This commit is contained in:
parent
62874e328d
commit
91f7f79fe1
|
|
@ -501,7 +501,7 @@ subtest 'nb_rows() tests' => sub {
|
||||||
|
|
||||||
subtest 'Returning passwords tests' => sub {
|
subtest 'Returning passwords tests' => sub {
|
||||||
|
|
||||||
plan tests => 3;
|
plan tests => 4;
|
||||||
|
|
||||||
my $dbh = C4::Context->dbh;
|
my $dbh = C4::Context->dbh;
|
||||||
$schema->storage->txn_begin;
|
$schema->storage->txn_begin;
|
||||||
|
|
@ -524,6 +524,12 @@ subtest 'Returning passwords tests' => sub {
|
||||||
|
|
||||||
is( defined($errors), 1, 'Query returns password field' );
|
is( defined($errors), 1, 'Query returns password field' );
|
||||||
|
|
||||||
|
$query = q{ SELECT password as secret FROM borrowers };
|
||||||
|
|
||||||
|
( $sth, $errors ) = execute_query( { sql => $query } );
|
||||||
|
|
||||||
|
is( defined($errors), 1, 'Error raised for returning password' );
|
||||||
|
|
||||||
$schema->storage->txn_rollback;
|
$schema->storage->txn_rollback;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue