Bug 14256: (follow-up) Check for unique constraint to regenerate random data
authorJonathan Druart <jonathan.druart@koha-community.org>
Thu, 4 Jun 2015 09:35:15 +0000 (11:35 +0200)
committerMason James <mtj@kohaaloha.com>
Fri, 2 Oct 2015 12:51:54 +0000 (01:51 +1300)
commit0f7b0ac8299075b8b77218cff31d5c5900b90d37
treef49bf2b39f686fe48efaa9b3eab8fc8e8d962ce1
parent0bac7826012b3536bfa62bf2fc1adee91da55b26
Bug 14256: (follow-up) Check for unique constraint to regenerate random data

There were some issues in the previous patch. This patch fixes the
following:
- rename $value with $original_value
- remove $at_least_one_constraint_failed and $values_ok which make the
  code unnecessarily complicated
- the constraints have to be checked only if no original value is passed
- _buildColumnValue created a key to the default value hashref, it broke
  the test:
    last BUILD_VALUE if exists( $default_value->{$source} );

Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
t/lib/TestBuilder.pm