Lines 2095-2106
subtest 'extended_attributes' => sub {
Link Here
|
2095 |
$patron_2->extended_attributes->filter_by_branch_limitations->delete; |
2095 |
$patron_2->extended_attributes->filter_by_branch_limitations->delete; |
2096 |
$patron_1->extended_attributes($attributes_for_1); |
2096 |
$patron_1->extended_attributes($attributes_for_1); |
2097 |
|
2097 |
|
2098 |
my $print_error = $schema->storage->dbh->{PrintError}; |
|
|
2099 |
$schema->storage->dbh->{PrintError} = 0; |
2100 |
warning_like { |
2098 |
warning_like { |
2101 |
$patron_2->extended_attributes($attributes_for_2); |
2099 |
$patron_2->extended_attributes($attributes_for_2); |
2102 |
} [ qr/a foreign key constraint fails/, qr/a foreign key constraint fails/ ], 'nonexistent attribute should have not exploded but print a warning'; |
2100 |
} [ qr/a foreign key constraint fails/ ], 'nonexistent attribute should have not exploded but print a warning'; |
2103 |
$schema->storage->dbh->{PrintError} = $print_error; |
|
|
2104 |
|
2101 |
|
2105 |
my $extended_attributes_for_1 = $patron_1->extended_attributes; |
2102 |
my $extended_attributes_for_1 = $patron_1->extended_attributes; |
2106 |
is( $extended_attributes_for_1->count, 3, 'There should be 3 attributes now for patron 1'); |
2103 |
is( $extended_attributes_for_1->count, 3, 'There should be 3 attributes now for patron 1'); |
2107 |
- |
|
|