]> 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)
committerJonathan Druart <jonathan.druart@bugs.koha-community.org>
Tue, 23 Jan 2018 19:05:54 +0000 (16:05 -0300)
commitc2bf4289ad16507f673bed36d222353adef6189f
treec31abe472421f8c0e0e7e9d762814e983b310b4b
parent85b0424eb704d416950510c30b41a10ce56cbc3b
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>
t/db_dependent/TestBuilder.t