This patch test 'IsOverDriveEnabled' subroutine TEST PLAN --------- 1. Apply patch 2. prove -v t/External/OverDrive.t -- All 6 tests should run successfully without any error or warning TEST PLAN OPTIONAL ------------------ Check with bug 13899 to see the coverage of this module. Coverage BEFORE this patch : Statement : 47,5% Branch : 0,0% Condition : 0,0% Subroutine : 75,0% Coverage AFTER this patch : Statement : 49,1% Branch : 0,0% Condition : 33,3% Subroutine : 83,3%
Created attachment 38843 [details] [review] Bug 14147 : Add unit tests to C4::External::OverDrive This patch test 'IsOverDriveEnabled' subroutine TEST PLAN --------- 1. Apply patch 2. prove -v t/External/OverDrive.t -- All tests should run successfully without any error or warning TEST PLAN OPTIONAL ------------------ Check with bug 13899 to see the coverage of this module. Coverage BEFORE this patch : Statement : 47,5% Branch : 0,0% Condition : 0,0% Subroutine : 75,0% Coverage AFTER this patch : Statement : 49,1% Branch : 0,0% Condition : 33,3% Subroutine : 83,3%
Created attachment 38847 [details] [review] Bug 14147 : Add unit tests to C4::External::OverDrive This patch test 'IsOverDriveEnabled' subroutine TEST PLAN --------- 1. Apply patch 2. prove -v t/External/OverDrive.t -- All tests should run successfully without any error or warning TEST PLAN OPTIONAL ------------------ Check with bug 13899 to see the coverage of this module. Coverage BEFORE this patch : Statement : 47,5% Branch : 0,0% Condition : 0,0% Subroutine : 75,0% Coverage AFTER this patch : Statement : 49,1% Branch : 0,0% Condition : 33,3% Subroutine : 83,3%
Created attachment 38949 [details] [review] [SIGNED-OFF] Bug 14147: Add unit tests to C4::External::OverDrive This patch test 'IsOverDriveEnabled' subroutine TEST PLAN --------- 1. Apply patch 2. prove -v t/External/OverDrive.t -- All tests should run successfully without any error or warning TEST PLAN OPTIONAL ------------------ Check with bug 13899 to see the coverage of this module. Coverage BEFORE this patch : Statement : 47,5% Branch : 0,0% Condition : 0,0% Subroutine : 75,0% Coverage AFTER this patch : Statement : 49,1% Branch : 0,0% Condition : 33,3% Subroutine : 83,3% Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com> Tests tun, no koha-qa errors
Hey Julian, I am not sure about passing QA on this patch. You only actually do some trivial tests for IsOverDriveEnabled. The real stuff with requests, UserAgent etc. (probably mocking OverDrive behavior somehow) is not there.
(In reply to Marcel de Rooy from comment #4) > Hey Julian, > I am not sure about passing QA on this patch. > You only actually do some trivial tests for IsOverDriveEnabled. > The real stuff with requests, UserAgent etc. (probably mocking OverDrive > behavior somehow) is not there. While I agree, I say any coverage is better than no coverage! This won't stop additional tests from being added later.
Created attachment 38991 [details] [review] [PASSED QA] Bug 14147: Add unit tests to C4::External::OverDrive This patch test 'IsOverDriveEnabled' subroutine TEST PLAN --------- 1. Apply patch 2. prove -v t/External/OverDrive.t -- All tests should run successfully without any error or warning TEST PLAN OPTIONAL ------------------ Check with bug 13899 to see the coverage of this module. Coverage BEFORE this patch : Statement : 47,5% Branch : 0,0% Condition : 0,0% Subroutine : 75,0% Coverage AFTER this patch : Statement : 49,1% Branch : 0,0% Condition : 33,3% Subroutine : 83,3% Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com> Tests tun, no koha-qa errors Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Patch pushed to master. Thanks Julian!