View | Details | Raw Unified | Return to bug 18420
Collapse All | Expand All

(-)a/t/db_dependent/Passwordrecovery.t (-6 / +6 lines)
Lines 21-26 use C4::Context; Link Here
21
use C4::Letters;
21
use C4::Letters;
22
use Koha::Database;
22
use Koha::Database;
23
use Koha::Patrons;
23
use Koha::Patrons;
24
use t::lib::TestBuilder;
24
25
25
use Test::More tests => 18;
26
use Test::More tests => 18;
26
27
Lines 35-41 $dbh->{RaiseError} = 1; Link Here
35
#
36
#
36
# Start with fresh data
37
# Start with fresh data
37
#
38
#
38
39
my $builder = t::lib::TestBuilder->new;
39
my $borrowernumber1 = '2000000000';
40
my $borrowernumber1 = '2000000000';
40
my $borrowernumber2 = '2000000001';
41
my $borrowernumber2 = '2000000001';
41
my $borrowernumber3 = '2000000002';
42
my $borrowernumber3 = '2000000002';
Lines 49-55 my $uuid1 = "ABCD1234"; Link Here
49
my $uuid2   = "WXYZ0987";
50
my $uuid2   = "WXYZ0987";
50
my $uuid3   = "LMNO4561";
51
my $uuid3   = "LMNO4561";
51
52
52
my $categorycode = 'S'; #  staff
53
my $patron_category = $builder->build({ source => 'Category' });
53
my $branch       = $schema->resultset('Branch')->first(); #  legit branch from your db
54
my $branch       = $schema->resultset('Branch')->first(); #  legit branch from your db
54
55
55
$schema->resultset('BorrowerPasswordRecovery')->delete_all();
56
$schema->resultset('BorrowerPasswordRecovery')->delete_all();
Lines 62-68 $schema->resultset('Borrower')->create( Link Here
62
        city            => '',
63
        city            => '',
63
        userid          => $userid1,
64
        userid          => $userid1,
64
        email           => $email1,
65
        email           => $email1,
65
        categorycode    => $categorycode,
66
        categorycode    => $patron_category->{categorycode},
66
        branchcode      => $branch,
67
        branchcode      => $branch,
67
    }
68
    }
68
);
69
);
Lines 74-80 $schema->resultset('Borrower')->create( Link Here
74
        city            => '',
75
        city            => '',
75
        userid          => $userid2,
76
        userid          => $userid2,
76
        email           => $email2,
77
        email           => $email2,
77
        categorycode    => $categorycode,
78
        categorycode    => $patron_category->{categorycode},
78
        branchcode      => $branch,
79
        branchcode      => $branch,
79
    }
80
    }
80
);
81
);
Lines 86-92 $schema->resultset('Borrower')->create( Link Here
86
        city           => '',
87
        city           => '',
87
        userid         => $userid3,
88
        userid         => $userid3,
88
        email          => $email3,
89
        email          => $email3,
89
        categorycode   => $categorycode,
90
        categorycode   => $patron_category->{categorycode},
90
        branchcode     => $branch,
91
        branchcode     => $branch,
91
    }
92
    }
92
);
93
);
93
- 

Return to bug 18420