Create Request.creator relationship
- Rename creator_id to user_id
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
from tests.factories import RequestFactory
|
||||
from tests.factories import RequestFactory, UserFactory
|
||||
from atst.domain.requests import Requests, RequestStatus
|
||||
|
||||
|
||||
@@ -19,3 +19,10 @@ def test_pending_ccpo_approval_requires_ccpo():
|
||||
request = Requests.set_status(request, RequestStatus.PENDING_CCPO_APPROVAL)
|
||||
|
||||
assert Requests.action_required_by(request) == "ccpo"
|
||||
|
||||
|
||||
def test_request_has_creator():
|
||||
user = UserFactory.create()
|
||||
request = RequestFactory.create(creator=user)
|
||||
|
||||
assert request.creator == user
|
||||
|
Reference in New Issue
Block a user