Bug 23825: (QA follow-up) Remove database name
As requested on comment15. Test plan: Run t/db_dependent/Koha/Object.t again Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
This commit is contained in:
parent
6a2c5d665e
commit
e5cdf88544
|
|
@ -174,12 +174,15 @@ sub store {
|
|||
duplicate_id => $+{key}
|
||||
);
|
||||
}
|
||||
elsif( $_->{msg} =~ /Incorrect (?<type>\w+) value: '(?<value>.*)' for column \W?(?<property>\S+)/ ) {
|
||||
# The optional \W in the regex might be a quote or backtick
|
||||
elsif( $_->{msg} =~ /Incorrect (?<type>\w+) value: '(?<value>.*)' for column \W?(?<property>\S+)/ ) { # The optional \W in the regex might be a quote or backtick
|
||||
my $type = $+{type};
|
||||
my $value = $+{value};
|
||||
my $property = $+{property};
|
||||
$property =~ s/['`]//g;
|
||||
Koha::Exceptions::Object::BadValue->throw(
|
||||
type => $+{type},
|
||||
value => $+{value},
|
||||
property => $+{property},
|
||||
type => $type,
|
||||
value => $value,
|
||||
property => $property =~ /(\w+\.\w+)$/ ? $1 : $property, # results in table.column without quotes or backtics
|
||||
);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -410,7 +410,7 @@ subtest 'store() tests' => sub {
|
|||
$patron->lastseen('wrong_value')->store;
|
||||
} catch {
|
||||
ok( $_->isa('Koha::Exceptions::Object::BadValue'), 'Exception thrown correctly' );
|
||||
like( $_->property, qr/borrowers\W?\.\W?lastseen/, 'Column should be the expected one' ); # optional \W for quote or backtic
|
||||
like( $_->property, qr/borrowers\.lastseen/, 'Column should be the expected one' );
|
||||
is( $_->value, 'wrong_value', 'Value should be the expected one' );
|
||||
};
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue