mirror of
https://github.com/GSA/notifications-api.git
synced 2026-05-04 00:00:27 -04:00
Add created_by_id to jobs table.
The user logged in will be the user marked as creating the job. The admin code already sends the created_by user when creating a job.
This commit is contained in:
@@ -235,7 +235,8 @@ def sample_job(notify_db,
|
||||
'template_id': template.id,
|
||||
'original_file_name': 'some.csv',
|
||||
'notification_count': notification_count,
|
||||
'created_at': created_at
|
||||
'created_at': created_at,
|
||||
'created_by': service.created_by
|
||||
}
|
||||
job = Job(**data)
|
||||
dao_create_job(job)
|
||||
@@ -275,7 +276,8 @@ def sample_email_job(notify_db,
|
||||
'service': service,
|
||||
'template_id': template.id,
|
||||
'original_file_name': 'some.csv',
|
||||
'notification_count': 1
|
||||
'notification_count': 1,
|
||||
'created_by': service.created_by
|
||||
}
|
||||
job = Job(**data)
|
||||
dao_create_job(job)
|
||||
|
||||
@@ -20,7 +20,8 @@ def test_create_job(sample_template):
|
||||
'service_id': sample_template.service.id,
|
||||
'template_id': sample_template.id,
|
||||
'original_file_name': 'some.csv',
|
||||
'notification_count': 1
|
||||
'notification_count': 1,
|
||||
'created_by': sample_template.created_by
|
||||
}
|
||||
|
||||
job = Job(**data)
|
||||
|
||||
@@ -97,7 +97,8 @@ def test_create_job(notify_api, sample_template, mocker, fake_uuid):
|
||||
'service': str(sample_template.service.id),
|
||||
'template': str(sample_template.id),
|
||||
'original_file_name': 'thisisatest.csv',
|
||||
'notification_count': 1
|
||||
'notification_count': 1,
|
||||
'created_by': str(sample_template.created_by.id)
|
||||
}
|
||||
path = '/service/{}/job'.format(sample_template.service.id)
|
||||
auth_header = create_authorization_header(
|
||||
|
||||
Reference in New Issue
Block a user