]> git.koha-community.org Git - koha.git/commit
Bug 18802: Fix Circulation.t if finesMode ne 'production'
authorJonathan Druart <jonathan.druart@bugs.koha-community.org>
Wed, 14 Jun 2017 14:32:30 +0000 (11:32 -0300)
committerJonathan Druart <jonathan.druart@bugs.koha-community.org>
Tue, 8 Aug 2017 12:21:42 +0000 (09:21 -0300)
commitae5f5c479929cbfad3193c6ce9471a406a2a41f3
tree3784896c383e162080e99d1098edb67d9600ae19
parent0bcf6a79427297c332588317dde749e923c7bbdc
Bug 18802: Fix Circulation.t if finesMode ne 'production'

If finesMode is not set to production, only 1 fine will be created (the renewal
one will not). This is what assumes the tests.
If set to 'production', the tests will fail because the fines will not
be deleted (because of the DBIx::Class) warning.
Now we mock the value before charging.

prove t/db_dependent/Circulation.t
t/db_dependent/Circulation.t .. 16/95 DBIx::Class::Storage::DBI::select_single(): Query returned more than one row.  SQL that returns multiple rows is DEPRECATED for ->find and ->single at t/db_dependent/Circulation.t line 491
t/db_dependent/Circulation.t .. 56/95
    #   Failed test 'Can auto renew, OPACFineNoRenewals=10, patron has 10'
    #   at t/db_dependent/Circulation.t line 670.
    #          got: 'auto_too_much_oweing'
    #     expected: 'auto_renew'
    # Looks like you failed 1 test of 6.

Test plan:
  prove t/db_dependent/Circulation.t
should return green whatever the value of finesMode

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
t/db_dependent/Circulation.t