Bug 14204 - Fix t/db_dependent/Labels/t_Batch.t failing test from Bug 12911
Summary: Fix t/db_dependent/Labels/t_Batch.t failing test from Bug 12911
Status: CLOSED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: Test Suite (show other bugs)
Version: master
Hardware: All All
: P5 - low normal (vote)
Assignee: Nick Clemens
QA Contact: Tomás Cohen Arazi
URL:
Whiteboard:
Keywords:
Depends on: 12911
Blocks:
  Show dependency treegraph
 
Reported: 2015-05-14 19:53 UTC by Nick Clemens
Modified: 2016-12-05 21:23 UTC (History)
4 users (show)

See Also:
Change sponsored?: ---
Patch complexity: Trivial patch
Bot Control: ---
When did the bot last check this:
Who signed the patch off:
Text to go in the release notes:


Attachments
Bug 14204 - Fix t/db_dependent/Labels/t_Batch.t failing test from Bug 12991 (1.06 KB, patch)
2015-05-14 19:59 UTC, Nick Clemens
Details | Diff | Splinter Review
Bug 14204 - Fix t/db_dependent/Labels/t_Batch.t failing test from Bug 12991 (1.24 KB, patch)
2015-05-15 14:44 UTC, M. Tompsett
Details | Diff | Splinter Review
[PASSED QA] Bug 14204: Fix t/db_dependent/Labels/t_Batch.t failing test from Bug 12991 (1.31 KB, patch)
2015-05-15 18:30 UTC, Tomás Cohen Arazi
Details | Diff | Splinter Review
Bug 14204: (QA followup) remove unneeded messages (4.23 KB, patch)
2015-05-15 18:32 UTC, Tomás Cohen Arazi
Details | Diff | Splinter Review
Bug 14204: (QA followup) remove unneeded messages (4.54 KB, patch)
2015-05-15 18:45 UTC, M. Tompsett
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Nick Clemens 2015-05-14 19:53:49 UTC
Bug 12991 altered the creation of label batches such that the batch_id is set at 0 until items are added.  The variable in the tests was set at batch creation and not updated after items were added to test batch and this led to failing tests
Comment 1 Nick Clemens 2015-05-14 19:59:40 UTC Comment hidden (obsolete)
Comment 2 M. Tompsett 2015-05-15 05:27:22 UTC
Bug 12991 has no patches on it, and it is set to NEW.
prove t/db_dependent/Labels/t_Batch.t works in master fine.
Granted I have no labels.
Do you? I'm trying to see why this is a problem.
Comment 3 M. Tompsett 2015-05-15 14:44:23 UTC Comment hidden (obsolete)
Comment 4 Tomás Cohen Arazi 2015-05-15 18:30:52 UTC
Created attachment 39217 [details] [review]
[PASSED QA] Bug 14204: Fix t/db_dependent/Labels/t_Batch.t failing test from Bug 12991

This patch updaes the batch_id variable after items are added to test batch

To test:
1. prove t/db_dependent/Labels/t_Batch.t and see two tests fail
2. apply patch
3. prove again, tests pass!

Signed-off-by: Mark Tompsett <mtompset@hotmail.com>

NOTE: The $batch->add_item() call to C4::Creators::Batch::add_item
      triggers the change of the batch_id so this line is necessary!
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
Comment 5 Tomás Cohen Arazi 2015-05-15 18:32:07 UTC Comment hidden (obsolete)
Comment 6 Tomás Cohen Arazi 2015-05-15 18:43:49 UTC
Patch pushed to master.

Thanks Nick for this quick response!
Comment 7 M. Tompsett 2015-05-15 18:45:20 UTC
Created attachment 39219 [details] [review]
Bug 14204: (QA followup) remove unneeded messages

TEST PLAN
---------
1) Apply first patch
2) prove -v t/db_dependent/Labels/t_Batch.t
   -- YUCK! No meaningful messages on a lot of the ok's.
3) Apply this patch
4) prove -v t/db_dependent/Labels/t_Batch.t
   -- YAY! Meaningful test results
5) koha qa test tools

Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>

Signed-off-by: Mark Tompsett <mtompset@hotmail.com>
Comment 8 Chris Cormack 2015-05-17 23:26:59 UTC
Pushed to 3.18.x will be in 3.18.7
Comment 9 Mason James 2015-05-29 08:01:32 UTC
Pushed to 3.16.x, will be in 3.16.11