Bug 17430

Summary: MarkIssueReturned.t should create its own data
Product: Koha Reporter: Tomás Cohen Arazi <tomascohen>
Component: Test SuiteAssignee: Tomás Cohen Arazi <tomascohen>
Status: CLOSED FIXED QA Contact: Galen Charlton <gmcharlt>
Severity: normal    
Priority: P5 - low CC: brendan, f.demians, jonathan.druart
Version: Main   
Hardware: All   
OS: All   
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
Bug 17430: Make MarkIssueReturned.t create its own data

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.