|
Lines 4-18
use Modern::Perl;
Link Here
|
| 4 |
|
4 |
|
| 5 |
use CGI; |
5 |
use CGI; |
| 6 |
|
6 |
|
| 7 |
use Test::More tests => 3; |
7 |
use Test::More tests => 4; |
| 8 |
|
8 |
|
| 9 |
use C4::Acquisition; |
9 |
use C4::Acquisition; |
| 10 |
use C4::Biblio; |
10 |
use C4::Biblio; |
| 11 |
use Koha::Database; |
11 |
use Koha::Database; |
| 12 |
use Koha::CsvProfile; |
12 |
use Koha::CsvProfiles; |
| 13 |
|
|
|
| 14 |
use Koha::Acquisition::Orders; |
13 |
use Koha::Acquisition::Orders; |
|
|
14 |
|
| 15 |
use t::lib::Mocks; |
15 |
use t::lib::Mocks; |
|
|
16 |
use Try::Tiny; |
| 16 |
|
17 |
|
| 17 |
my $schema = Koha::Database->new()->schema(); |
18 |
my $schema = Koha::Database->new()->schema(); |
| 18 |
$schema->storage->txn_begin(); |
19 |
$schema->storage->txn_begin(); |
|
Lines 84-87
is($basket_csv3, 'biblio.author,title,quantity
Link Here
|
| 84 |
"King, Stephen","Test Record",3 |
85 |
"King, Stephen","Test Record",3 |
| 85 |
', 'CSV should be generated with user profile which does not have all headers defined'); |
86 |
', 'CSV should be generated with user profile which does not have all headers defined'); |
| 86 |
|
87 |
|
|
|
88 |
try { |
| 89 |
my $basket_csv4 = C4::Acquisition::GetBasketAsCSV($basketno, $query, 'non_existant_profile_id'); |
| 90 |
fail("It is not possible to export basket using non-existant profile"); |
| 91 |
} catch { |
| 92 |
ok($_->isa("Koha::Exceptions::ObjectNotFound"), "Using non-existant profile should throw ObjectNotFound exception"); |
| 93 |
}; |
| 94 |
|
| 87 |
$schema->storage->txn_rollback(); |
95 |
$schema->storage->txn_rollback(); |
| 88 |
- |
|
|