|
Lines 5-11
Link Here
|
| 5 |
|
5 |
|
| 6 |
use Modern::Perl; |
6 |
use Modern::Perl; |
| 7 |
|
7 |
|
| 8 |
use Test::More tests => 14; |
8 |
use Test::More tests => 15; |
| 9 |
|
9 |
|
| 10 |
use C4::Context; |
10 |
use C4::Context; |
| 11 |
|
11 |
|
|
Lines 85-90
is_deeply(
Link Here
|
| 85 |
'running a query with a parameter returned the expected result' |
85 |
'running a query with a parameter returned the expected result' |
| 86 |
); |
86 |
); |
| 87 |
|
87 |
|
|
|
88 |
# for next test, we want to let execute_query capture any SQL errors |
| 89 |
$dbh->{RaiseError} = 0; |
| 90 |
my $errors; |
| 91 |
($sth, $errors) = execute_query( |
| 92 |
'SELECT surname FRM borrowers', # error in the query is intentional |
| 93 |
0, |
| 94 |
10, |
| 95 |
); |
| 96 |
ok( |
| 97 |
defined($errors) && exists($errors->{queryerr}), |
| 98 |
'attempting to run a report with an SQL syntax error returns error message (Bug 12214)' |
| 99 |
); |
| 100 |
|
| 88 |
#End transaction |
101 |
#End transaction |
| 89 |
$dbh->rollback; |
102 |
$dbh->rollback; |
| 90 |
|
103 |
|
| 91 |
- |
|
|