Lines 52-59
subtest 'Start with some trivial tests' => sub {
Link Here
|
52 |
'Build should not accept a hash for this column'; |
52 |
'Build should not accept a hash for this column'; |
53 |
|
53 |
|
54 |
# return undef if a record exists |
54 |
# return undef if a record exists |
55 |
my $param = { source => 'Branch', value => { branchcode => 'MPL' } }; |
55 |
my $branchcode = $builder->build({ source => 'Branch' })->{branchcode}; |
56 |
$builder->build( $param ); # at least it should exist now |
56 |
my $param = { source => 'Branch', value => { branchcode => $branchcode } }; |
57 |
warning_like { $builder->build( $param ) } |
57 |
warning_like { $builder->build( $param ) } |
58 |
qr/Violation of unique constraint/, |
58 |
qr/Violation of unique constraint/, |
59 |
'Catch warn on adding existing record'; |
59 |
'Catch warn on adding existing record'; |
60 |
- |
|
|