Bug 17430 - MarkIssueReturned.t should create its own data
Summary: MarkIssueReturned.t should create its own data
Status: CLOSED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: Test Suite (show other bugs)
Version: Main
Hardware: All All
: P5 - low normal (vote)
Assignee: Tomás Cohen Arazi
QA Contact: Galen Charlton
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-10-12 08:59 UTC by Tomás Cohen Arazi
Modified: 2017-06-14 22:13 UTC (History)
3 users (show)

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


Attachments
Bug 17430: Make MarkIssueReturned.t create its own data (2.25 KB, patch)
2016-10-12 09:05 UTC, Tomás Cohen Arazi
Details | Diff | Splinter Review
Bug 17430: Make MarkIssueReturned.t create its own data (2.33 KB, patch)
2016-10-12 09:22 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 Tomás Cohen Arazi 2016-10-12 08:59:09 UTC
It just doesn't.

To reproduce:
- Have a category created with categorycode = C
- Run:
  $ prove t/db_dependent/Circulation/MarkIssueReturned.t
=> FAIL: primary key issues on the DB
Comment 1 Tomás Cohen Arazi 2016-10-12 09:05:50 UTC
Created attachment 56233 [details] [review]
Bug 17430: Make MarkIssueReturned.t create its own data

This patch makes MarkIssueReturned.t use t::lib::TestBuilder to create
the data it needs.

To test:
- On master, have a category with categorycode = C
- Run:
  $ prove t/db_dependent/Circulation/MarkIssueReturned.t
=> FAIL: primary key problems make the tests fail
- Apply the patch
- Run:
  $ prove t/db_dependent/Circulation/MarkIssueReturned.t
=> SUCCESS: Tests are green!
- Sign off :-D
Comment 2 Jonathan Druart 2016-10-12 09:22:59 UTC
Created attachment 56237 [details] [review]
Bug 17430: Make MarkIssueReturned.t create its own data

This patch makes MarkIssueReturned.t use t::lib::TestBuilder to create
the data it needs.

To test:
- On master, have a category with categorycode = C
- Run:
  $ prove t/db_dependent/Circulation/MarkIssueReturned.t
=> FAIL: primary key problems make the tests fail
- Apply the patch
- Run:
  $ prove t/db_dependent/Circulation/MarkIssueReturned.t
=> SUCCESS: Tests are green!
- Sign off :-D

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Comment 3 Jonathan Druart 2016-10-12 09:25:23 UTC
Trivial changes, skipping QA.
Comment 4 Brendan Gallagher 2016-10-17 22:57:04 UTC
Pushed to Master - Should be in the November 2016 Release.  Thanks!
Comment 5 Frédéric Demians 2016-10-22 12:49:59 UTC
Pushed in 16.05. Will be in 16.05.05.