Lines 408-415
subtest 'add() tests' => sub {
Link Here
|
408 |
# Set a date-time field |
408 |
# Set a date-time field |
409 |
$newpatron->{last_seen} = output_pref({ dt => dt_from_string->add( days => -1 ), dateformat => 'rfc3339' }); |
409 |
$newpatron->{last_seen} = output_pref({ dt => dt_from_string->add( days => -1 ), dateformat => 'rfc3339' }); |
410 |
|
410 |
|
|
|
411 |
t::lib::Mocks::mock_preference( 'AutoEmailNewUser', 0 ); |
411 |
$letter_enqueued = 0; |
412 |
$letter_enqueued = 0; |
412 |
$t->post_ok("//$userid:$password@/api/v1/patrons" => { 'x-koha-welcome' => 'email' } => json => $newpatron) |
413 |
$t->post_ok( |
|
|
414 |
"//$userid:$password@/api/v1/patrons" => { 'x-koha-override' => 'welcome_yes' } => json => $newpatron ) |
413 |
->status_is(201, 'Patron created successfully') |
415 |
->status_is(201, 'Patron created successfully') |
414 |
->header_like( |
416 |
->header_like( |
415 |
Location => qr|^\/api\/v1\/patrons/\d*|, |
417 |
Location => qr|^\/api\/v1\/patrons/\d*|, |
416 |
- |
|
|