Bug 8612: [QA Follow-up] Remove two newlines from template output
When using the Default profile from the basket form, the resulting csv file has an additional newline after the headers and at the end. This patch removes them. Unit test adjusted accordingly. Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
This commit is contained in:
parent
7e111f1b3f
commit
273659cc03
|
|
@ -1,3 +1,4 @@
|
|||
[% INCLUDE csv_headers/acqui/basket.tt %]
|
||||
[% FOREACH r IN rows %]"[% r.contractname %]",[% r.ordernumber %],[% r.entrydate %],[% r.isbn %],"[% r.author %]","[% r.title %]",[% r.publicationyear %],"[% r.publishercode %]","[% r.collectiontitle %]","[% r.notes %]",[% r.quantity %],[% r.rrp %],"[% r.deliveryplace %]","[% r.billingplace %]"
|
||||
[% END %]
|
||||
[%- FOREACH r IN rows -%]
|
||||
"[% r.contractname %]",[% r.ordernumber %],[% r.entrydate %],[% r.isbn %],"[% r.author %]","[% r.title %]",[% r.publicationyear %],"[% r.publishercode %]","[% r.collectiontitle %]","[% r.notes %]",[% r.quantity %],[% r.rrp %],"[% r.deliveryplace %]","[% r.billingplace %]"
|
||||
[% END -%]
|
||||
|
|
|
|||
|
|
@ -72,9 +72,7 @@ is($basket_csv1, 'autor,title,quantity
|
|||
# Use default template
|
||||
my $basket_csv2 = C4::Acquisition::GetBasketAsCSV($basketno, $query);
|
||||
is($basket_csv2, 'Contract name,Order number,Entry date,ISBN,Author,Title,Publication year,Publisher,Collection title,Note for vendor,Quantity,RRP,Delivery place,Billing place
|
||||
|
||||
"",' . $order->{ordernumber} . ',2016-01-02,,"King, Stephen","Test Record",,"","","",3,,"",""
|
||||
|
||||
', 'CSV should be generated with default template');
|
||||
|
||||
my $basket_csv3 = C4::Acquisition::GetBasketAsCSV($basketno, $query, $csv_profile2->export_format_id);
|
||||
|
|
|
|||
Loading…
Reference in New Issue