Lines 398-405
subtest 'add() tests' => sub {
Link Here
|
398 |
# Set a date-time field |
398 |
# Set a date-time field |
399 |
$newpatron->{last_seen} = output_pref({ dt => dt_from_string->add( days => -1 ), dateformat => 'rfc3339' }); |
399 |
$newpatron->{last_seen} = output_pref({ dt => dt_from_string->add( days => -1 ), dateformat => 'rfc3339' }); |
400 |
|
400 |
|
|
|
401 |
t::lib::Mocks::mock_preference( 'AutoEmailNewUser', 0 ); |
401 |
$letter_enqueued = 0; |
402 |
$letter_enqueued = 0; |
402 |
$t->post_ok("//$userid:$password@/api/v1/patrons" => { 'x-koha-welcome' => 'email' } => json => $newpatron) |
403 |
$t->post_ok( |
|
|
404 |
"//$userid:$password@/api/v1/patrons" => { 'x-koha-override' => 'welcome_yes' } => json => $newpatron ) |
403 |
->status_is(201, 'Patron created successfully') |
405 |
->status_is(201, 'Patron created successfully') |
404 |
->header_like( |
406 |
->header_like( |
405 |
Location => qr|^\/api\/v1\/patrons/\d*|, |
407 |
Location => qr|^\/api\/v1\/patrons/\d*|, |
406 |
- |
|
|