Bugzilla – Attachment 128073 Details for
Bug 23991
Move SearchSuggestion to Koha::Suggestions
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 23991: Remove SearchSuggestion tests
Bug-23991-Remove-SearchSuggestion-tests.patch (text/plain), 4.65 KB, created by
Tomás Cohen Arazi (tcohen)
on 2021-11-29 13:53:51 UTC
(
hide
)
Description:
Bug 23991: Remove SearchSuggestion tests
Filename:
MIME Type:
Creator:
Tomás Cohen Arazi (tcohen)
Created:
2021-11-29 13:53:51 UTC
Size:
4.65 KB
patch
obsolete
>From 9dc1c6bfe2fdf70fdf7508fbdb5a4e0145444027 Mon Sep 17 00:00:00 2001 >From: Tomas Cohen Arazi <tomascohen@theke.io> >Date: Mon, 29 Nov 2021 10:25:37 -0300 >Subject: [PATCH] Bug 23991: Remove SearchSuggestion tests > >Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> >--- > t/db_dependent/Suggestions.t | 71 +----------------------------------- > 1 file changed, 2 insertions(+), 69 deletions(-) > >diff --git a/t/db_dependent/Suggestions.t b/t/db_dependent/Suggestions.t >index 44e90a945a..f5fd4589b7 100755 >--- a/t/db_dependent/Suggestions.t >+++ b/t/db_dependent/Suggestions.t >@@ -18,7 +18,7 @@ > use Modern::Perl; > > use DateTime::Duration; >-use Test::More tests => 106; >+use Test::More tests => 90; > use Test::Warn; > > use t::lib::Mocks; >@@ -34,7 +34,7 @@ use Koha::Patrons; > use Koha::Suggestions; > > BEGIN { >- use_ok('C4::Suggestions', qw( NewSuggestion GetSuggestion ModSuggestion GetSuggestionInfo GetSuggestionFromBiblionumber GetSuggestionInfoFromBiblionumber GetSuggestionByStatus ConnectSuggestionAndBiblio SearchSuggestion DelSuggestion MarcRecordFromNewSuggestion GetUnprocessedSuggestions DelSuggestionsOlderThan )); >+ use_ok('C4::Suggestions', qw( NewSuggestion GetSuggestion ModSuggestion GetSuggestionInfo GetSuggestionFromBiblionumber GetSuggestionInfoFromBiblionumber GetSuggestionByStatus ConnectSuggestionAndBiblio DelSuggestion MarcRecordFromNewSuggestion GetUnprocessedSuggestions DelSuggestionsOlderThan )); > } > > my $schema = Koha::Database->new->schema; >@@ -329,73 +329,6 @@ is( $connect_suggestion_and_biblio, '1', 'ConnectSuggestionAndBiblio returns 1' > $suggestion = GetSuggestion($my_suggestionid); > is( $suggestion->{biblionumber}, $biblio_2->biblionumber, 'ConnectSuggestionAndBiblio updates the biblio number correctly' ); > >-my $search_suggestion = SearchSuggestion(); >-is( @$search_suggestion, 3, 'SearchSuggestion without arguments returns all suggestions' ); >- >-$search_suggestion = SearchSuggestion({ >- title => $mod_suggestion1->{title}, >-}); >-is( @$search_suggestion, 1, 'SearchSuggestion returns the correct number of suggestions' ); >-$search_suggestion = SearchSuggestion({ >- title => 'another title', >-}); >-is( @$search_suggestion, 0, 'SearchSuggestion returns the correct number of suggestions' ); >- >-$search_suggestion = SearchSuggestion({ >- author => $mod_suggestion1->{author}, >-}); >-is( @$search_suggestion, 1, 'SearchSuggestion returns the correct number of suggestions' ); >-$search_suggestion = SearchSuggestion({ >- author => 'another author', >-}); >-is( @$search_suggestion, 0, 'SearchSuggestion returns the correct number of suggestions' ); >- >-$search_suggestion = SearchSuggestion({ >- publishercode => $mod_suggestion1->{publishercode}, >-}); >-is( @$search_suggestion, 1, 'SearchSuggestion returns the correct number of suggestions' ); >-$search_suggestion = SearchSuggestion({ >- publishercode => 'another publishercode', >-}); >-is( @$search_suggestion, 0, 'SearchSuggestion returns the correct number of suggestions' ); >- >-$search_suggestion = SearchSuggestion({ >- STATUS => $mod_suggestion3->{STATUS}, >-}); >-is( @$search_suggestion, 2, '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', >-}); >-is( @$search_suggestion, 0, 'SearchSuggestion returns the correct number of suggestions' ); >- >-$search_suggestion = SearchSuggestion({ >- budgetid => '', >-}); >-is( @$search_suggestion, 3, 'SearchSuggestion (budgetid = "") returns the correct number of suggestions' ); >-$search_suggestion = SearchSuggestion({ >- budgetid => $budget_id, >-}); >-is( @$search_suggestion, 2, 'SearchSuggestion (budgetid = $budgetid) returns the correct number of suggestions' ); >-$search_suggestion = SearchSuggestion({ >- budgetid => '__NONE__', >-}); >-is( @$search_suggestion, 1, 'SearchSuggestion (budgetid = "__NONE__") returns the correct number of suggestions' ); >-$search_suggestion = SearchSuggestion({ >- budgetid => '__ANY__', >-}); >-is( @$search_suggestion, 3, 'SearchSuggestion (budgetid = "__ANY__") returns the correct number of suggestions' ); >- >-$search_suggestion = SearchSuggestion({ budgetid => $budget_id }); >-is( @$search_suggestion[0]->{budget_name}, GetBudget($budget_id)->{budget_name}, 'SearchSuggestion returns the correct budget name'); >-$search_suggestion = SearchSuggestion({ budgetid => "__NONE__" }); >-is( @$search_suggestion[0]->{budget_name}, undef, 'SearchSuggestion returns the correct budget name'); >- >- > my $del_suggestion = { > title => 'my deleted title', > STATUS => 'CHECKED', >-- >2.32.0
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 23991
:
95172
|
115203
|
115207
|
116639
|
118454
|
119256
|
127058
|
127100
|
128071
|
128072
|
128073
|
128074
|
128075
|
129511
|
129512
|
129513
|
129523
|
130049
|
131896
|
132026
|
132169
|
132170
|
132171
|
132172
|
132173
|
132174
|
132175
|
133874
|
134922
|
136441
|
136442
|
137201