Lines 17-23
Link Here
|
17 |
|
17 |
|
18 |
use Modern::Perl; |
18 |
use Modern::Perl; |
19 |
|
19 |
|
20 |
use Test::More tests => 76; |
20 |
use Test::More tests => 77; |
21 |
use Test::MockModule; |
21 |
use Test::MockModule; |
22 |
use Data::Dumper; |
22 |
use Data::Dumper; |
23 |
use C4::Context; |
23 |
use C4::Context; |
Lines 371-376
my $password="";
Link Here
|
371 |
is( $password =~ /^[a-zA-Z]{10}$/ , 1, 'Test for autogenerated password if none submitted'); |
371 |
is( $password =~ /^[a-zA-Z]{10}$/ , 1, 'Test for autogenerated password if none submitted'); |
372 |
( $borrowernumber, $password ) = AddMember_Opac(surname=>"Deckard",firstname=>"Rick",password=>"Nexus-6",branchcode => $library2->{branchcode}); |
372 |
( $borrowernumber, $password ) = AddMember_Opac(surname=>"Deckard",firstname=>"Rick",password=>"Nexus-6",branchcode => $library2->{branchcode}); |
373 |
is( $password eq "Nexus-6", 1, 'Test password used if submitted'); |
373 |
is( $password eq "Nexus-6", 1, 'Test password used if submitted'); |
|
|
374 |
$borrower = GetMember(borrowernumber => $borrowernumber); |
375 |
my $hashed_up = Koha::AuthUtils::hash_password("Nexus-6", $borrower->{password}); |
376 |
is( $borrower->{password} eq $hashed_up, 1, 'Check password hash equals hash of submitted password' ); |
374 |
|
377 |
|
375 |
|
378 |
|
376 |
|
379 |
|
377 |
- |
|
|