Bugzilla – Attachment 63914 Details for
Bug 8612
CSV export profile to have custom fields in export csv basket
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 8612: [Follow-up] Fix unit test GetBasketAsCSV.t
Bug-8612-Follow-up-Fix-unit-test-GetBasketAsCSVt.patch (text/plain), 2.46 KB, created by
Marcel de Rooy
on 2017-06-02 06:54:15 UTC
(
hide
)
Description:
Bug 8612: [Follow-up] Fix unit test GetBasketAsCSV.t
Filename:
MIME Type:
Creator:
Marcel de Rooy
Created:
2017-06-02 06:54:15 UTC
Size:
2.46 KB
patch
obsolete
>From 76ca06fbd7eac049243975ac26dddaaa6f30e9e9 Mon Sep 17 00:00:00 2001 >From: Josef Moravec <josef.moravec@gmail.com> >Date: Mon, 20 Mar 2017 09:05:13 +0000 >Subject: [PATCH] Bug 8612: [Follow-up] Fix unit test GetBasketAsCSV.t >Content-Type: text/plain; charset=utf-8 > >Test plan: >Run t/db_dependent/Acquisition/GetBasketAsCSV.t > >Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> >--- > t/db_dependent/Acquisition/GetBasketAsCSV.t | 19 ++++++++++++++----- > 1 file changed, 14 insertions(+), 5 deletions(-) > >diff --git a/t/db_dependent/Acquisition/GetBasketAsCSV.t b/t/db_dependent/Acquisition/GetBasketAsCSV.t >index 4cc1ad5..b6dfdbe 100644 >--- a/t/db_dependent/Acquisition/GetBasketAsCSV.t >+++ b/t/db_dependent/Acquisition/GetBasketAsCSV.t >@@ -4,7 +4,7 @@ use Modern::Perl; > > use CGI; > >-use Test::More tests => 2; >+use Test::More tests => 3; > > use C4::Acquisition; > use C4::Biblio; >@@ -16,9 +16,6 @@ use Koha::Acquisition::Order; > my $schema = Koha::Database->new()->schema(); > $schema->storage->txn_begin(); > >-my $dbh = C4::Context->dbh; >-$dbh->{RaiseError} = 1; >- > my $query = CGI->new(); > > my $vendor = Koha::Acquisition::Bookseller->new({ >@@ -41,6 +38,13 @@ my $csv_profile = Koha::CsvProfile->new({ > content => 'autor=biblio.author|title=biblio.title|quantity=aqorders.quantity', > })->store; > >+my $csv_profile2 = Koha::CsvProfile->new({ >+ profile => 'my user profile', >+ type => 'export_basket', >+ csv_separator => ',', >+ content => 'biblio.author | title = biblio.title|quantity=aqorders.quantity', >+})->store; >+ > my $basketno; > $basketno = NewBasket($vendor->id, 1); > >@@ -65,7 +69,7 @@ is($basket_csv1, 'autor,title,quantity > "King, Stephen","Test Record",3 > ', 'CSV should be generated with user profile'); > >-# Use defautl template >+# 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 > >@@ -73,4 +77,9 @@ is($basket_csv2, 'Contract name,Order number,Entry date,ISBN,Author,Title,Public > > ', 'CSV should be generated with default template'); > >+my $basket_csv3 = C4::Acquisition::GetBasketAsCSV($basketno, $query, $csv_profile2->export_format_id); >+is($basket_csv3, 'biblio.author,title,quantity >+"King, Stephen","Test Record",3 >+', 'CSV should be generated with user profile which does not have all headers defined'); >+ > $schema->storage->txn_rollback(); >-- >2.1.4
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 8612
:
11514
|
36860
|
37289
|
37293
|
41224
|
41225
|
41226
|
41227
|
42532
|
42533
|
42534
|
47591
|
47592
|
47593
|
56222
|
56223
|
56224
|
56225
|
57012
|
57013
|
57024
|
57025
|
57026
|
57027
|
57028
|
57029
|
57079
|
58073
|
58074
|
58075
|
58076
|
58077
|
58078
|
58079
|
58985
|
58986
|
58987
|
58988
|
58989
|
58990
|
58991
|
58992
|
59757
|
60480
|
61264
|
61265
|
61266
|
61267
|
61405
|
61520
|
63048
|
63049
|
63050
|
63051
|
63052
|
63053
|
63054
|
63055
|
63056
|
63104
|
63158
|
63279
|
63910
|
63911
|
63912
|
63913
| 63914 |
63915
|
63964
|
63966