Bug 10644

Summary: C4::ClassSource.pm needs unit tests
Product: Koha Reporter: kenza <kenza.zaki>
Component: Test SuiteAssignee: kenza <kenza.zaki>
Status: CLOSED FIXED QA Contact: Testopia <testopia>
Severity: normal    
Priority: P5 - low CC: bgkriegel, chrish, gmcharlt, katrin.fischer, kenza.zaki, tomascohen
Version: unspecified   
Hardware: All   
OS: All   
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
[SIGNED-OFF] Bug 10644: ClassSource.pm needs unit tests
[PASSED QA] Bug 10644: ClassSource.pm needs unit tests
[PASSED QA] Bug 10644: ClassSource.pm needs unit tests
[PASSED QA] Bug 10644: ClassSource.pm needs unit tests

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