]> git.koha-community.org Git - koha.git/commit
Bug 19985: Make TestBuilder.t pass even if default_circ_rules is not empty
authorJonathan Druart <jonathan.druart@bugs.koha-community.org>
Mon, 22 Jan 2018 20:18:59 +0000 (17:18 -0300)
committerFridolin Somers <fridolin.somers@biblibre.com>
Thu, 8 Feb 2018 09:52:06 +0000 (10:52 +0100)
commit8fdbaee0e4678a3e5d3f9a64ee6bb5d6ba9118ea
treedc689c743b601778dceb71d1baedecd0569a3260
parentc2d7c71c91bf5b3579abdca5937ddb0c611aaca8
Bug 19985: Make TestBuilder.t pass even if default_circ_rules is not empty

This table cannot contain more than 1 row, so we need to remove its data
before trying to generate a new entry.

Test plan:
Set a default circ rule
 prove t/db_dependent/TestBuilder.t
should return green

Without this patch you get:
    #   Failed test 'TestBuilder should be able to create an object for every source'
    #   at t/db_dependent/TestBuilder.t line 78.
    #          got: '1'
    #     expected: '0'
    # The following sources have not been generated correctly: DefaultCircRule
    # Looks like you failed 1 test of 1.

Signed-off-by: Mark Tompsett <mtompset@hotmail.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 55d8ea59e7964d05ffb68e7bfcf14d6556ed8739)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
t/db_dependent/TestBuilder.t