From af8a0109f7d1a21015a05501c336f83fe7cfc9b0 Mon Sep 17 00:00:00 2001 From: Jonathan Druart Date: Tue, 3 May 2016 16:13:27 +0100 Subject: [PATCH] Bug 16325: Add a test for SearchSuggestions when searching for STATUS='' MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Test fails as expected without second patch and passes OK with second patch. Signed-off-by: Marc VĂ©ron --- t/db_dependent/Suggestions.t | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/t/db_dependent/Suggestions.t b/t/db_dependent/Suggestions.t index a960331..79e5cbe 100644 --- a/t/db_dependent/Suggestions.t +++ b/t/db_dependent/Suggestions.t @@ -28,7 +28,7 @@ use Koha::Library; use Koha::Libraries; use DateTime::Duration; -use Test::More tests => 105; +use Test::More tests => 106; use Test::Warn; BEGIN { @@ -303,6 +303,11 @@ $search_suggestion = SearchSuggestion({ STATUS => $mod_suggestion3->{STATUS}, }); is( @$search_suggestion, 1, 'SearchSuggestion returns the correct number of suggestions' ); + +$search_suggestion = SearchSuggestion({ + STATUS => q|| +}); +is( @$search_suggestion, 0, 'SearchSuggestion should not return all suggestions if we want the suggestions with a STATUS=""' ); $search_suggestion = SearchSuggestion({ STATUS => 'REJECTED', }); -- 1.7.10.4