Summary: | UT: Testing AddShare in VirtualShelves.t | ||
---|---|---|---|
Product: | Koha | Reporter: | Marcel de Rooy <m.de.rooy> |
Component: | Test Suite | Assignee: | Marcel de Rooy <m.de.rooy> |
Status: | CLOSED MOVED | QA Contact: | |
Severity: | normal | ||
Priority: | P5 - low | CC: | jonathan.druart, m.de.rooy, srdjan |
Version: | Main | ||
Hardware: | All | ||
OS: | All | ||
Change sponsored?: | --- | Patch complexity: | --- |
Documentation contact: | Documentation submission: | ||
Text to go in the release notes: | Version(s) released in: | ||
Circulation function: | |||
Attachments: |
Bug 10441: Testing AddShare in VirtualShelves.t
Bug 10441: Testing AddShare in VirtualShelves.t [SIGNED-OFF] Bug 10441: Testing AddShare in VirtualShelves.t Bug 10441: QA Followup for Virtualshelves.t Bug 10441: UT: Create patrons for Virtualshelves.t |
Description
Marcel de Rooy
2013-06-10 12:58:15 UTC
Created attachment 18822 [details] [review] Bug 10441: Testing AddShare in VirtualShelves.t Builds upon 10386 and 9032. Adds a unit test for routine AddShare. Test plan: Run the test. All passed? I'm not disputing the test itself, but wouldn't it be nice if AddShare returned something to indicate sucsess/failure? (In reply to comment #2) > I'm not disputing the test itself, but wouldn't it be nice if AddShare > returned something to indicate sucsess/failure? Thanks for testing. First of all, you are right of course. By far, we are not testing the success of mysql insert statements in Koha. In some cases it is done (saw one when e.g. adding a biblio); note that AddShare is not the most critical operation :) AddShare could however simply check DBI's err and return a boolean. Will leave the two reports as they are now for the moment, but will later handle this in a followup. See also report 10499. This patch removed the DelShelf code. Will include it again in rebasing this patch. Created attachment 19721 [details] [review] Bug 10441: Testing AddShare in VirtualShelves.t Builds upon 10386 and 9032. Adds a unit test for routine AddShare. This patch also restores the inadvertently deleted DelShelf tests in bug 10499. Test plan: Run the test. All passed? Created attachment 19736 [details] [review] [SIGNED-OFF] Bug 10441: Testing AddShare in VirtualShelves.t Builds upon 10386 and 9032. Adds a unit test for routine AddShare. This patch also restores the inadvertently deleted DelShelf tests in bug 10499. Test plan: Run the test. All passed? Signed-off-by: Srdjan <srdjan@catalyst.net.nz> Just an idea, maybe use SKIP block rather than if(). (In reply to Srdjan Jankovic from comment #7) > Just an idea, maybe use SKIP block rather than if(). Thanks for testing, Srdjan. Yes, could have used skip here too. Can imagine cases where skip would really be a better choice. In this case fairly arbitrary.. Quick review: Please prefer "is" instead of "ok": ok(1 == $status, "deleted shelf $shelfnumber and its contents"); is( $status, 1, "deleted shelf $shelfnumber and its contents"); and for my $i ( 0 .. 9 ) { instead of for(my $i=0; $i<10;$i++){ Created attachment 19936 [details] [review] Bug 10441: QA Followup for Virtualshelves.t As requested by Jonathan: Replace a i++ construct by 0..9; added a space to similar constructs. Change ok-calls by is-calls where applicable. Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> 83 tests still pass, no complaints from koha-qa. Created attachment 20505 [details] [review] Bug 10441: UT: Create patrons for Virtualshelves.t Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com> Patch this depends on is currently 'failed qa' - using blocked to indicate that this can't be QA'd right now. I will move this code to bug 9032. Close this report now. |