diff --git a/VERSIONS_HOTLINE/84896 b/VERSIONS_HOTLINE/84896 new file mode 100644 index 0000000000000000000000000000000000000000..4e3cdca87da463525e0eb28d973a971b0e97a9b9 --- /dev/null +++ b/VERSIONS_HOTLINE/84896 @@ -0,0 +1 @@ + - ticket #84896 : SIGB Nanook : activation de la réinitialisation des mots de passe par courriel \ No newline at end of file diff --git a/library/Class/WebService/SIGB/Nanook/Service.php b/library/Class/WebService/SIGB/Nanook/Service.php index ac30505db7302a232a9b25eebd8838e3c37b82e2..d474d356220777977b0b57bffb85c7b012e3ab32 100644 --- a/library/Class/WebService/SIGB/Nanook/Service.php +++ b/library/Class/WebService/SIGB/Nanook/Service.php @@ -125,6 +125,11 @@ class Class_Webservice_SIGB_Nanook_Service extends Class_WebService_SIGB_Abstrac } + public function providesChangePasswordService() { + return true; + } + + public function saveEmprunteur($emprunteur) { $xml = $this->getWebClient() ->postData($this->buildQueryURL(['service'=>'UpdatePatronInfo', diff --git a/tests/library/Class/User/LostPassTest.php b/tests/library/Class/User/LostPassTest.php index 7844721e2458757f810826a709797e50f2f568fb..3d000ea4d701c14e4b53cbc7c69377e77412ca3c 100644 --- a/tests/library/Class/User/LostPassTest.php +++ b/tests/library/Class/User/LostPassTest.php @@ -92,6 +92,15 @@ class Class_User_LostPassSendTest extends ModelTestCase { } + /** @test */ + public function withNanookMailShouldContainsResetLink() { + $this->_sigb->setCommSigb(Class_IntBib::COM_NANOOK)->save(); + (new Class_User_LostPass($this->_user))->send(); + $mail = $this->_mail_transport->getSentMails()[0]->getBodyText()->getContent(); + $this->assertContains('/auth/reset-password', $mail); + } + + /** @test */ public function withPergameShouldNotsendMail() { $this->_sigb->setCommSigb(Class_IntBib::COM_PERGAME)->save();