Lines 42-48
subtest 'Config does not exist' => sub {
Link Here
|
42 |
|
42 |
|
43 |
$schema->storage->txn_begin; |
43 |
$schema->storage->txn_begin; |
44 |
|
44 |
|
45 |
t::lib::Mocks::mock_config( 'key', '' ); |
45 |
t::lib::Mocks::mock_config( 'bcrypt_settings', '' ); |
46 |
t::lib::Mocks::mock_preference( 'Pseudonymization', 1 ); |
46 |
t::lib::Mocks::mock_preference( 'Pseudonymization', 1 ); |
47 |
t::lib::Mocks::mock_preference( 'PseudonymizationPatronFields', 'branchcode,categorycode,sort1' ); |
47 |
t::lib::Mocks::mock_preference( 'PseudonymizationPatronFields', 'branchcode,categorycode,sort1' ); |
48 |
|
48 |
|
Lines 64-71
subtest 'Config does not exist' => sub {
Link Here
|
64 |
); |
64 |
); |
65 |
|
65 |
|
66 |
} catch { |
66 |
} catch { |
67 |
ok($_->isa('Koha::Exceptions::Config::MissingEntry'), "Koha::Patron->store should raise a Koha::Exceptions::Config::MissingEntry if 'key' is not defined in the config"); |
67 |
ok($_->isa('Koha::Exceptions::Config::MissingEntry'), "Koha::Patron->store should raise a Koha::Exceptions::Config::MissingEntry if 'bcrypt_settings' is not defined in the config"); |
68 |
is( $_->message, "Missing 'key' entry in config file"); |
68 |
is( $_->message, "Missing 'bcrypt_settings' entry in config file"); |
69 |
}; |
69 |
}; |
70 |
|
70 |
|
71 |
$schema->storage->txn_rollback; |
71 |
$schema->storage->txn_rollback; |
Lines 77-83
subtest 'Koha::Anonymized::Transactions tests' => sub {
Link Here
|
77 |
|
77 |
|
78 |
$schema->storage->txn_begin; |
78 |
$schema->storage->txn_begin; |
79 |
|
79 |
|
80 |
t::lib::Mocks::mock_config( 'key', '$2a$08$9lmorEKnwQloheaCLFIfje' ); |
80 |
t::lib::Mocks::mock_config( 'bcrypt_settings', '$2a$08$9lmorEKnwQloheaCLFIfje' ); |
81 |
|
81 |
|
82 |
my $patron = $builder->build_object( { class => 'Koha::Patrons' } ); |
82 |
my $patron = $builder->build_object( { class => 'Koha::Patrons' } ); |
83 |
|
83 |
|
Lines 122-128
subtest 'PseudonymizedBorrowerAttributes tests' => sub {
Link Here
|
122 |
|
122 |
|
123 |
$schema->storage->txn_begin; |
123 |
$schema->storage->txn_begin; |
124 |
|
124 |
|
125 |
t::lib::Mocks::mock_config( 'key', '$2a$08$9lmorEKnwQloheaCLFIfje' ); |
125 |
t::lib::Mocks::mock_config( 'bcrypt_settings', '$2a$08$9lmorEKnwQloheaCLFIfje' ); |
126 |
t::lib::Mocks::mock_preference( 'Pseudonymization', 1 ); |
126 |
t::lib::Mocks::mock_preference( 'Pseudonymization', 1 ); |
127 |
t::lib::Mocks::mock_preference( 'PseudonymizationPatronFields', |
127 |
t::lib::Mocks::mock_preference( 'PseudonymizationPatronFields', |
128 |
'branchcode,categorycode,sort1' ); |
128 |
'branchcode,categorycode,sort1' ); |
129 |
- |
|
|