Bug 34845 - GetBasketGroupAsCSV.t is failing if the DB has been upgraded
Summary: GetBasketGroupAsCSV.t is failing if the DB has been upgraded
Status: RESOLVED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: Test Suite (show other bugs)
Version: unspecified
Hardware: All All
: P5 - low normal (vote)
Assignee: Jonathan Druart
QA Contact: Testopia
URL:
Keywords:
Depends on: 28327 34043
Blocks: 34841
  Show dependency treegraph
 
Reported: 2023-09-20 13:10 UTC by Jonathan Druart
Modified: 2023-12-28 20:47 UTC (History)
1 user (show)

See Also:
Change sponsored?: ---
Patch complexity: ---
Documentation contact:
Documentation submission:
Text to go in the release notes:
Version(s) released in:
23.11.00


Attachments
Bug 34845: Fix GetBasketGroupAsCSV.t is CSVDelimiter is not ',' (903 bytes, patch)
2023-09-22 12:37 UTC, Jonathan Druart
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Jonathan Druart 2023-09-20 13:10:34 UTC
The syspref needs to be mocked, or the tests are failing.

To recreate:
root@kohadevbox:koha$ perl /kohadevbox/misc4dev/run_tests.pl --run-db-upgrade-only

kohadev-koha@kohadevbox:koha$ prove t/db_dependent/Acquisition/GetBasketGroupAsCSV.t
t/db_dependent/Acquisition/GetBasketGroupAsCSV.t .. 1/2 
#   Failed test 'CSV should be generated'
#   at t/db_dependent/Acquisition/GetBasketGroupAsCSV.t line 62.
#          got: '"Account number";"Basket name";"Order number";"Author";"Title";"Publisher";"Publication year";"Collection title";"ISBN";"Quantity";"RRP tax included";"RRP tax excluded";"Discount";"Estimated cost tax included";"Estimated cost tax excluded";"Note for vendor";"Entry date";"Bookseller name";"Bookseller physical address";"Bookseller postal address";"Contract number";"Contract name";"Basket group delivery place";"Basket group billing place";"Basket delivery place";"Basket billing place"# ;"";1;"King, Stephen";"Test Record";"";;"";;3;0.00;0.00;;0.00;0.00;"";2016-01-02;"my vendor";"vendor address";"";;"";"";"";"";""# '
#     expected: '"Account number","Basket name","Order number","Author","Title","Publisher","Publication year","Collection title","ISBN","Quantity","RRP tax included","RRP tax excluded","Discount","Estimated cost tax included","Estimated cost tax excluded","Note for vendor","Entry date","Bookseller name","Bookseller physical address","Bookseller postal address","Contract number","Contract name","Basket group delivery place","Basket group billing place","Basket delivery place","Basket billing place"# ,"",1,"King, Stephen","Test Record","",,"",,3,0.00,0.00,,0.00,0.00,"",2016-01-02,"my vendor","vendor address","",,"","","","",""# '

#   Failed test 'CSV should not fail if biblio does not exist'
#   at t/db_dependent/Acquisition/GetBasketGroupAsCSV.t line 73.
#          got: '"Account number";"Basket name";"Order number";"Author";"Title";"Publisher";"Publication year";"Collection title";"ISBN";"Quantity";"RRP tax included";"RRP tax excluded";"Discount";"Estimated cost tax included";"Estimated cost tax excluded";"Note for vendor";"Entry date";"Bookseller name";"Bookseller physical address";"Bookseller postal address";"Contract number";"Contract name";"Basket group delivery place";"Basket group billing place";"Basket delivery place";"Basket billing place"
# ;"";1;"";"";"";;"";;3;0.00;0.00;;0.00;0.00;"";2016-01-02;"my vendor";"vendor address";"";;"";"";"";"";""
# '
#     expected: '"Account number","Basket name","Order number","Author","Title","Publisher","Publication year","Collection title","ISBN","Quantity","RRP tax included","RRP tax excluded","Discount","Estimated cost tax included","Estimated cost tax excluded","Note for vendor","Entry date","Bookseller name","Bookseller physical address","Bookseller postal address","Contract number","Contract name","Basket group delivery place","Basket group billing place","Basket delivery place","Basket billing place"
# ,"",1,"","","",,"",,3,0.00,0.00,,0.00,0.00,"",2016-01-02,"my vendor","vendor address","",,"","","","",""
# '
# Looks like you failed 2 tests of 2.
Comment 1 Jonathan Druart 2023-09-22 12:37:44 UTC
Created attachment 156084 [details] [review]
Bug 34845: Fix GetBasketGroupAsCSV.t is CSVDelimiter is not ','
Comment 2 Tomás Cohen Arazi 2023-09-22 13:56:16 UTC
Pushed to master for 23.11.

Nice work everyone, thanks!
Comment 3 Fridolin Somers 2023-09-22 19:24:24 UTC
Depends on Bug 34043 not in 23.05.x