Skip to content
Snippets Groups Projects
Commit f27a19bc authored by Dan Braghis's avatar Dan Braghis
Browse files

Add a test

parent cda02e65
No related branches found
No related tags found
No related merge requests found
from opentech.apply.funds.tests.factories import ApplicationSubmissionFactory, ApplicationRevisionFactory
from opentech.apply.users.tests.factories import UserFactory
from opentech.apply.users.tests.factories import UserFactory, StaffFactory
from opentech.apply.utils.tests import BaseViewTestCase
......@@ -46,3 +46,20 @@ class TestApplicantDashboard(BaseViewTestCase):
response = self.get_page()
self.assertNotContains(response, 'Edit')
self.assertNotContains(response, 'Submission history')
class TestStaffDashboard(BaseViewTestCase):
user_factory = StaffFactory
url_name = 'dashboard:{}'
base_view_name = 'dashboard'
def test_can_see_need_determinations(self):
ApplicationSubmissionFactory(status='concept_review_discussion', workflow_stages=2, lead=self.user,
form_data__title='Internet of things')
response = self.get_page()
self.assertContains(response, 'Internet of things')
def test_cannot_see_submission_in_determination_when_not_lead(self):
ApplicationSubmissionFactory(status='concept_review_discussion', workflow_stages=2, form_data__title='Reviewr')
response = self.get_page()
self.assertNotContains(response, 'Reviewr')
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment