From d63c0eb0611dc70e14e71c0a2607f98a1bff127a Mon Sep 17 00:00:00 2001 From: Tomas Cohen Arazi Date: Mon, 30 Mar 2020 10:20:11 -0300 Subject: [PATCH] Bug 25008: Tests for ->options Signed-off-by: Jonathan Druart --- t/RecordProcessor.t | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/t/RecordProcessor.t b/t/RecordProcessor.t index aab2b3c0f5..9a0db02797 100755 --- a/t/RecordProcessor.t +++ b/t/RecordProcessor.t @@ -151,7 +151,7 @@ subtest 'new() tests' => sub { subtest 'options() tests' => sub { - plan tests => 4; + plan tests => 6; # Create a processor with some options my $record_processor = Koha::RecordProcessor->new( @@ -178,12 +178,15 @@ subtest 'options() tests' => sub { ); # Update the chosen options - $record_processor->options( + my $ret = $record_processor->options( { dummy => 'something else' } ); + is( ref($ret), 'Koha::RecordProcessor', 'The setter return the object for chaining calls' ); + is_deeply( $record_processor->options, { dummy => 'something else' }, 'The getter works as expected' ); + # Re-fetch the filter $filter = $record_processor->filters->[0]; -- 2.20.1