[Koha-bugs] [Bug 15160] GetTopIssues.t should create random data

bugzilla-daemon at bugs.koha-community.org bugzilla-daemon at bugs.koha-community.org
Mon Nov 9 15:42:30 CET 2015


http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15160

--- Comment #1 from Tomás Cohen Arazi <tomascohen at gmail.com> ---
Created attachment 44650
  -->
http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=44650&action=edit
Bug 15160: GetTopIssues.t should create random data

This patch refactors t/db_dependent/Circulation/GetTopIssues.t so it
creates its own data with random values. It does so by replacing (legacy)
SQL inserts and fixed value data inserting by TestBuilder generated data.

There is no expected behaviour change.

To test:
- Create an itemtyp directly on your DB with GTI_I_TEST as its itemtype
  > INSERT INTO itemtypes (itemtype) VALUES ('GTI_I_TEST');
- Run:
  $ prove t/db_dependent/Circulation/GetTopIssues.t
=> FAIL: The insert line fails
- Apply the patch
- Run:
  $ prove t/db_dependent/Circulation/GetTopIssues.t
=> SUCCESS: tests pass due to random data usage.
- Sign off

-- 
You are receiving this mail because:
You are watching all bug changes.


More information about the Koha-bugs mailing list