Bug 21956: (bug 21775 follow-up) Use set_preference to reset the value
authorJonathan Druart <jonathan.druart@bugs.koha-community.org>
Wed, 5 Dec 2018 19:23:24 +0000 (16:23 -0300)
committerMartin Renvoize <martin.renvoize@ptfs-europe.com>
Thu, 20 Dec 2018 09:53:42 +0000 (09:53 +0000)
Test plan:
Set AudioAlerts to 0
Prove t/db_dependent/selenium/regressions.t
=> Without this patch the value of the pref is not reset to 0

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 674a34471f6eddfc849c480c557f6576f8572516)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

t/db_dependent/selenium/regressions.t

index 84c6d62..4e8c9d7 100644 (file)
@@ -185,8 +185,8 @@ subtest 'Display circulation table correctly' => sub {
 };
 
 END {
-    C4::Context->preference('SearchEngine', $SearchEngine_value);
-    C4::Context->preference('AudioAlerts', $AudioAlerts_value);
+    C4::Context->set_preference('SearchEngine', $SearchEngine_value);
+    C4::Context->set_preference('AudioAlerts', $AudioAlerts_value);
     $_->delete for @cleanup;
 };