Summary: | GetTopIssues.t should create random data | ||
---|---|---|---|
Product: | Koha | Reporter: | Tomás Cohen Arazi (tcohen) <tomascohen> |
Component: | Test Suite | Assignee: | Chris Cormack <chris> |
Status: | CLOSED FIXED | QA Contact: | Galen Charlton <gmcharlt> |
Severity: | enhancement | ||
Priority: | P5 - low | CC: | tomascohen |
Version: | Main | ||
Hardware: | All | ||
OS: | All | ||
Change sponsored?: | --- | Patch complexity: | Small patch |
Documentation contact: | Documentation submission: | ||
Text to go in the release notes: | Version(s) released in: | ||
Circulation function: | |||
Attachments: |
Bug 15160: GetTopIssues.t should create random data
Bug 15160: GetTopIssues.t should create random data Bug 15160: GetTopIssues.t should create random data |
Description
Tomás Cohen Arazi (tcohen)
2015-11-09 14:35:58 UTC
Created attachment 44650 [details] [review] 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 Created attachment 44683 [details] [review] 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 Signed-off-by: Frederic Demians <f.demians@tamil.fr> Test plan produces the expected result, failing, then OK. Created attachment 44687 [details] [review] 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 Signed-off-by: Frederic Demians <f.demians@tamil.fr> Test plan produces the expected result, failing, then OK. Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Patch pushed to master. |