]> git.koha-community.org Git - koha.git/commit
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)
committerChris Cormack <chrisc@catalyst.net.nz>
Thu, 11 Jun 2015 20:06:14 +0000 (08:06 +1200)
commit1ae372980b11381bae8c32d3f8afd2e9382d50d9
tree122318bb1b68157dfe7a31efea7f464140d84c17
parent47159b672e8328b66673fb9253bbecb75a5a69dd
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>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
(cherry picked from commit c5bc51d7d1b6c98e9d897022f91d8e0806cf4524)
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
t/lib/TestBuilder.pm