Bugzilla – Attachment 165579 Details for
Bug 36122
NEW_SUGGESTION is sent for every modification to the suggestion
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 36122: modif test
Bug-36122-modif-test.patch (text/plain), 1.93 KB, created by
Roman Dolny
on 2024-04-25 18:52:20 UTC
(
hide
)
Description:
Bug 36122: modif test
Filename:
MIME Type:
Creator:
Roman Dolny
Created:
2024-04-25 18:52:20 UTC
Size:
1.93 KB
patch
obsolete
>From 37539f3f69205390e19556d9f3b73d0ba94bf2b8 Mon Sep 17 00:00:00 2001 >From: Matthias Le Gac <matthias.le-gac@inlibro.com> >Date: Fri, 5 Apr 2024 10:12:37 -0400 >Subject: [PATCH] Bug 36122: modif test > >Signed-off-by: Roman Dolny <roman.dolny@jezuici.pl> >--- > t/db_dependent/Koha/Suggestions.t | 7 ++----- > 1 file changed, 2 insertions(+), 5 deletions(-) > >diff --git a/t/db_dependent/Koha/Suggestions.t b/t/db_dependent/Koha/Suggestions.t >index 467e207a92..1254248e43 100755 >--- a/t/db_dependent/Koha/Suggestions.t >+++ b/t/db_dependent/Koha/Suggestions.t >@@ -23,7 +23,6 @@ use Test::More tests => 11; > use Test::Exception; > > use Koha::Suggestions; >-use Koha::Config::SysPrefs; > use Koha::Notice::Messages; > use Koha::Database; > use Koha::DateUtils qw( dt_from_string output_pref ); >@@ -68,8 +67,7 @@ subtest 'store' => sub { > $suggestion = Koha::Suggestions->find( $suggestion->suggestionid ); > is( $suggestion->suggesteddate, $two_days_ago_sql, 'If suggestion id modified, suggesteddate should not be modified' ); > >- my $syspref = Koha::Config::SysPrefs->find('EmailPurchaseSuggestions'); >- $syspref->value(0)->store; >+ t::lib::Mocks::mock_preference( 'EmailPurchaseSuggestions', 0 ); > Koha::Notice::Messages->search->delete; > $suggestion->STATUS('ASKED')->store; > my $last_message = Koha::Notice::Messages->search( {}, { order_by => { -desc => 'message_id' } } )->single; >@@ -81,8 +79,7 @@ subtest 'store' => sub { > 'If EmailPurchaseSuggestions is not enabled, a message should not be sent' > ); > >- $syspref = Koha::Config::SysPrefs->find('EmailPurchaseSuggestions'); >- $syspref->value('EmailAddressForSuggestions')->store; >+ t::lib::Mocks::mock_preference( 'EmailPurchaseSuggestions', 'EmailAddressForSuggestions' ); > Koha::Notice::Messages->search->delete; > $suggestion->STATUS('ASKED')->store; > $last_message = Koha::Notice::Messages->search( {}, { order_by => { -desc => 'message_id' } } )->single; >-- >2.39.2
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 36122
:
162962
|
162989
|
164481
|
165577
|
165578
|
165579
|
166051
|
166052
|
166053