mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-08-24 16:24:08 -04:00
Add a component for picking the time to send a job
Users need to pick a time in the next 24hrs, or send a file immediately. Rationale for this is a bit lost in time-before-holiday, but generally: ‘Now’ and ‘later’ as the inital choices makes it really clear what this feature is about conceptually. The choice of times is absolute, eg ‘1pm’ not ‘in 3 hours’
This commit is contained in:
@@ -27,6 +27,21 @@ def test_client_creates_job_data_correctly(mocker, fake_uuid):
|
||||
mock_post.assert_called_once_with(url=expected_url, data=expected_data)
|
||||
|
||||
|
||||
def test_client_schedules_job(mocker, fake_uuid):
|
||||
|
||||
mocker.patch('app.notify_client.current_user', id='1')
|
||||
|
||||
mock_post = mocker.patch('app.notify_client.job_api_client.JobApiClient.post')
|
||||
|
||||
when = '2016-08-25T13:04:21.767198'
|
||||
|
||||
JobApiClient().create_job(
|
||||
fake_uuid, fake_uuid, fake_uuid, fake_uuid, 1, scheduled_for=when
|
||||
)
|
||||
|
||||
assert mock_post.call_args[1]['data']['scheduled_for'] == when
|
||||
|
||||
|
||||
def test_client_gets_job_by_service_and_job(mocker):
|
||||
mocker.patch('app.notify_client.current_user', id='1')
|
||||
|
||||
|
||||
Reference in New Issue
Block a user