View | Details | Raw Unified | Return to bug 8612
Collapse All | Expand All

(-)a/t/db_dependent/Acquisition/GetBasketAsCSV.t (-2 / +13 lines)
Lines 4-10 use Modern::Perl; Link Here
4
4
5
use CGI;
5
use CGI;
6
6
7
use Test::More tests => 2;
7
use Test::More tests => 3;
8
8
9
use C4::Acquisition;
9
use C4::Acquisition;
10
use C4::Biblio;
10
use C4::Biblio;
Lines 38-43 my $csv_profile = Koha::CsvProfile->new({ Link Here
38
    content => 'autor=biblio.author|title=biblio.title|quantity=aqorders.quantity',
38
    content => 'autor=biblio.author|title=biblio.title|quantity=aqorders.quantity',
39
})->store;
39
})->store;
40
40
41
my $csv_profile2 = Koha::CsvProfile->new({
42
    profile => 'my user profile',
43
    type => 'export_basket',
44
    csv_separator => ',',
45
    content => 'biblio.author|title=biblio.title|quantity=aqorders.quantity',
46
})->store;
47
41
my $basketno;
48
my $basketno;
42
$basketno = NewBasket($vendor->id, 1);
49
$basketno = NewBasket($vendor->id, 1);
43
50
Lines 70-73 is($basket_csv2, 'Contract name,Order number,Entry date,ISBN,Author,Title,Public Link Here
70
77
71
', 'CSV should be generated with default template');
78
', 'CSV should be generated with default template');
72
79
80
my $basket_csv3 = C4::Acquisition::GetBasketAsCSV($basketno, $query, $csv_profile2->export_format_id);
81
is($basket_csv3, 'biblio.author,title,quantity
82
"King, Stephen","Test Record",3
83
', 'CSV should be generated with user profile which does not have all headers defined');
84
73
$schema->storage->txn_rollback();
85
$schema->storage->txn_rollback();
74
- 

Return to bug 8612