Bug 10644 - C4::ClassSource.pm needs unit tests
Summary: C4::ClassSource.pm needs unit tests
Status: CLOSED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: Test Suite (show other bugs)
Version: unspecified
Hardware: All All
: P5 - low normal (vote)
Assignee: kenza
QA Contact: Testopia
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-07-25 12:35 UTC by kenza
Modified: 2014-12-07 20:02 UTC (History)
6 users (show)

See Also:
Change sponsored?: ---
Patch complexity: ---
Documentation contact:
Documentation submission:
Text to go in the release notes:
Version(s) released in:


Attachments
Bug 10644: ClassSource.pm needs unit tests (7.35 KB, patch)
2013-07-26 12:43 UTC, kenza
Details | Diff | Splinter Review
[SIGNED-OFF] Bug 10644: ClassSource.pm needs unit tests (7.40 KB, patch)
2013-07-29 03:59 UTC, Srdjan Jankovic
Details | Diff | Splinter Review
[PASSED QA] Bug 10644: ClassSource.pm needs unit tests (7.47 KB, patch)
2013-07-31 21:25 UTC, Katrin Fischer
Details | Diff | Splinter Review
[PASSED QA] Bug 10644: ClassSource.pm needs unit tests (7.47 KB, patch)
2013-07-31 21:27 UTC, Katrin Fischer
Details | Diff | Splinter Review
[PASSED QA] Bug 10644: ClassSource.pm needs unit tests (7.47 KB, patch)
2013-07-31 21:29 UTC, Katrin Fischer
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description kenza 2013-07-25 12:35:30 UTC

    
Comment 1 kenza 2013-07-26 12:43:38 UTC Comment hidden (obsolete)
Comment 2 Srdjan Jankovic 2013-07-29 03:59:16 UTC Comment hidden (obsolete)
Comment 3 Katrin Fischer 2013-07-31 21:25:37 UTC Comment hidden (obsolete)
Comment 4 Katrin Fischer 2013-07-31 21:27:06 UTC Comment hidden (obsolete)
Comment 5 Katrin Fischer 2013-07-31 21:29:31 UTC
Created attachment 20028 [details] [review]
[PASSED QA] Bug 10644: ClassSource.pm needs unit tests

The tests are wrap in a database transaction.

To test:
prove t/db_dependent/ClassSource.t
t/db_dependent/ClassSource.t .. 1/24 prepare_cached(SELECT * FROM `class_sort_rules` WHERE `class_sort_rule` = ?) statement handle DBI::st=HASH(0x92dbedc) still Active at C4/ClassSource.pm line 249
prepare_cached(SELECT * FROM `class_sources` WHERE cn_source = ?) statement handle DBI::st=HASH(0x926876c) still Active at C4/ClassSource.pm line 137
attempting to use non-existent class sorting routine routine1
prepare_cached(SELECT * FROM `class_sort_rules` WHERE `class_sort_rule` = ?) statement handle DBI::st=HASH(0x92dbedc) still Active at C4/ClassSource.pm line 249
prepare_cached(SELECT * FROM `class_sources` WHERE cn_source = ?) statement handle DBI::st=HASH(0x926876c) still Active at C4/ClassSource.pm line 137
t/db_dependent/ClassSource.t .. ok
All tests successful.
Files=1, Tests=24,  0 wallclock secs ( 0.02 usr  0.00 sys +  0.12 cusr  0.01 csys =  0.15 CPU)
Result: PASS

Signed-off-by: Srdjan <srdjan@catalyst.net.nz>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Comment 6 Katrin Fischer 2013-07-31 21:31:57 UTC
Hi Kenza, 
I have fixed(?) your name and email address to what it was in your last patch going in - could you check if I did it right? You may also want to change your git configuration to have the email address of your choice and your full name in the patches.
Comment 7 kenza 2013-08-01 07:14:51 UTC
(In reply to Katrin Fischer from comment #6)
> Hi Kenza, 
> I have fixed(?) your name and email address to what it was in your last
> patch going in - could you check if I did it right? You may also want to
> change your git configuration to have the email address of your choice and
> your full name in the patches.

Hi! My name and my email address are right! And yes i'll change my git configuration right now!
Comment 8 Katrin Fischer 2013-08-01 07:17:21 UTC
Cool, then this is ready for Galen now :)
Comment 9 Galen Charlton 2013-08-01 15:10:42 UTC
Pushed to master, along with a follow-up to fix some typos in the test descriptions.  Thanks, Kenza!
Comment 10 Galen Charlton 2013-08-09 18:58:52 UTC
I've pushed a follow-up to remove a Perl 5.14ism that had crept in.
Comment 11 Tomás Cohen Arazi 2013-08-16 15:58:48 UTC
This patch and Galen's follwup have been pushed to 3.12.x, will be in 3.12.4.

Thanks Kenza and Galen!
Comment 12 Bernardo Gonzalez Kriegel 2013-09-13 22:52:59 UTC
Pushed to 3.10.x, will be in 3.10.11
Comment 13 Chris Hall 2013-09-17 07:54:40 UTC
Pushed to 3.8.x, will be in 3.8.18