From 017bce3d7708c86bbf57057345eb60164926398c Mon Sep 17 00:00:00 2001 From: Kyle Hall Date: Mon, 11 Apr 2022 06:37:58 -0400 Subject: [PATCH] Bug 26370: (QA follow-up) Rename option never_demagnitize to inhouse_patron_categories Signed-off-by: Martin Renvoize Signed-off-by: Fridolin Somers --- C4/SIP/Sip/MsgType.pm | 2 +- t/db_dependent/SIP/Message.t | 24 ++++++++++++------------ 2 files changed, 13 insertions(+), 13 deletions(-) diff --git a/C4/SIP/Sip/MsgType.pm b/C4/SIP/Sip/MsgType.pm index 5cc65baa79..2f7ba7da0f 100644 --- a/C4/SIP/Sip/MsgType.pm +++ b/C4/SIP/Sip/MsgType.pm @@ -1747,7 +1747,7 @@ sub desensitize { my $patron = $params->{patron}; my $server = $params->{server}; - my $patron_categories = $server->{account}->{never_demagnitize}; + my $patron_categories = $server->{account}->{inhouse_patron_categories}; # If no patron categories are set for never desensitize, no need to do anything return $desensitize unless $patron_categories; diff --git a/t/db_dependent/SIP/Message.t b/t/db_dependent/SIP/Message.t index 46ca9b2253..485dc62e53 100755 --- a/t/db_dependent/SIP/Message.t +++ b/t/db_dependent/SIP/Message.t @@ -906,22 +906,22 @@ sub test_checkout_desensitize { undef $response; my $msg = C4::SIP::Sip::MsgType->new( $siprequest, 0 ); - $server->{account}->{never_demagnitize} = "A,$patron_category,Z"; + $server->{account}->{inhouse_patron_categories} = "A,$patron_category,Z"; $msg->handle_checkout( $server ); my $respcode = substr( $response, 5, 1 ); - is( $respcode, 'N', "Desensitize flag was not set for patron category in never_demagnitize" ); + is( $respcode, 'N', "Desensitize flag was not set for patron category in inhouse_patron_categories" ); undef $response; - $server->{account}->{never_demagnitize} = "A,B,C"; + $server->{account}->{inhouse_patron_categories} = "A,B,C"; $msg->handle_checkout( $server ); $respcode = substr( $response, 5, 1 ); - is( $respcode, 'Y', "Desensitize flag was set for patron category not in never_demagnitize" ); + is( $respcode, 'Y', "Desensitize flag was set for patron category not in inhouse_patron_categories" ); undef $response; - $server->{account}->{never_demagnitize} = ""; + $server->{account}->{inhouse_patron_categories} = ""; $msg->handle_checkout( $server ); $respcode = substr( $response, 5, 1 ); - is( $respcode, 'Y', "Desensitize flag was set for empty never_demagnitize" ); + is( $respcode, 'Y', "Desensitize flag was set for empty inhouse_patron_categories" ); } sub test_renew_desensitize { @@ -972,22 +972,22 @@ sub test_renew_desensitize { undef $response; my $msg = C4::SIP::Sip::MsgType->new( $siprequest, 0 ); - $server->{account}->{never_demagnitize} = "A,$patron_category,Z"; + $server->{account}->{inhouse_patron_categories} = "A,$patron_category,Z"; $msg->handle_checkout( $server ); my $respcode = substr( $response, 5, 1 ); - is( $respcode, 'N', "Desensitize flag was not set for patron category in never_demagnitize" ); + is( $respcode, 'N', "Desensitize flag was not set for patron category in inhouse_patron_categories" ); undef $response; - $server->{account}->{never_demagnitize} = "A,B,C"; + $server->{account}->{inhouse_patron_categories} = "A,B,C"; $msg->handle_checkout( $server ); $respcode = substr( $response, 5, 1 ); - is( $respcode, 'Y', "Desensitize flag was set for patron category not in never_demagnitize" ); + is( $respcode, 'Y', "Desensitize flag was set for patron category not in inhouse_patron_categories" ); undef $response; - $server->{account}->{never_demagnitize} = ""; + $server->{account}->{inhouse_patron_categories} = ""; $msg->handle_checkout( $server ); $respcode = substr( $response, 5, 1 ); - is( $respcode, 'Y', "Desensitize flag was set for empty never_demagnitize" ); + is( $respcode, 'Y', "Desensitize flag was set for empty inhouse_patron_categories" ); } # Helper routines -- 2.39.5