Summary: | Increasing test coverage for C4::Category | ||
---|---|---|---|
Product: | Koha | Reporter: | Roman Amor <romanwilton> |
Component: | Test Suite | Assignee: | Chris Cormack <chris> |
Status: | CLOSED FIXED | QA Contact: | Galen Charlton <gmcharlt> |
Severity: | enhancement | ||
Priority: | P5 - low | CC: | kyle |
Version: | unspecified | ||
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: | ||
Attachments: |
Proposed patch
Bug 11543: Increasing test coverage for Category.pm Bug 11543: Increasing test coverage for Category.pm Bug 11543: Increasing test coverage for Category.pm Bug 11543: Increasing test coverage for Category.pm Bug 11543: (followup) Increasing test coverage for Category.pm [PASSED QA] Bug 11543: Increasing test coverage for Category.pm [PASSED QA] Bug 11543: (followup) Increasing test coverage for Category.pm |
Description
Roman Amor
2014-01-14 01:14:36 UTC
Created attachment 24252 [details] [review] Proposed patch Created attachment 24257 [details] [review] Bug 11543: Increasing test coverage for Category.pm To test: 1. Run prove t/Coverage.t 2. Apply patch 3. Run prove t/Coverage.t - Notice 2 tests were run Signed-off-by: daniel <daniel.barker.nz@gmail.com> Created attachment 24258 [details] [review] Bug 11543: Increasing test coverage for Category.pm To test: 1. Run prove t/Coverage.t 2. Apply patch 3. Run prove t/Coverage.t - Notice 2 tests were run Signed-off-by: daniel <daniel.barker.nz@gmail.com> This patch assumes that at least one patron category exists, but does not create or mock any. I believe the test would fail without any categories in the database. The best course of action would be to create a dummy category before running the test, then roll back the insert at the end of the test. In addition, it would be good practice to move this file to t/db_dependent since this test is indeed dependent on the database. Created attachment 24318 [details] [review] Bug 11543: Increasing test coverage for Category.pm To test: 1. Run prove t/db_dependent/Category.t 2. Apply patch 3. Run prove t/db_dependent/Category.t - Notice 2 tests were run Signed-off-by: daniel <daniel.barker.nz@gmail.com> Made the requested changes. Created attachment 24419 [details] [review] Bug 11543: Increasing test coverage for Category.pm To test: 1. Run prove t/db_dependent/Category.t 2. Apply patch 3. Run prove t/db_dependent/Category.t - Notice 2 tests were run Signed-off-by: daniel <daniel.barker.nz@gmail.com> Made the requested changes. Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com> Created attachment 24420 [details] [review] Bug 11543: (followup) Increasing test coverage for Category.pm Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com> Created attachment 24422 [details] [review] [PASSED QA] Bug 11543: Increasing test coverage for Category.pm To test: 1. Run prove t/db_dependent/Category.t 2. Apply patch 3. Run prove t/db_dependent/Category.t - Notice 2 tests were run Signed-off-by: daniel <daniel.barker.nz@gmail.com> Made the requested changes. Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com> Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de> Created attachment 24423 [details] [review] [PASSED QA] Bug 11543: (followup) Increasing test coverage for Category.pm Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com> Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de> Pushed to master. Congratulations on having your first patch accepted into Koha, Roman! |