Commit 5562ac65 authored by Bryan  BRANCOTTE's avatar Bryan BRANCOTTE
Browse files

check that curator can see history, but cannot get a former very they are not involved in

parent bfbd3720
......@@ -62,6 +62,20 @@ class DataSourceHistoryTestCase(base_test_case.OneDataSourceTestCase):
self.assertEqual(self.client.get(url_restore).status_code, 200)
self.assertEqual(self.client.post(url_restore, dict(agree="True")).status_code, 302)
self.client.force_login(self.curator)
self.ds.public = True
self.ds.save()
self.assertEqual(self.client.get(url_see).status_code, 200)
self.assertEqual(self.client.get(url_get).status_code, 404)
self.assertEqual(self.client.get(url_restore).status_code, 404)
self.assertEqual(self.client.post(url_restore, dict(agree="True")).status_code, 404)
self.ds.public = False
self.ds.save()
self.assertEqual(self.client.get(url_see).status_code, 404)
self.assertEqual(self.client.get(url_get).status_code, 404)
self.assertEqual(self.client.get(url_restore).status_code, 404)
self.assertEqual(self.client.post(url_restore, dict(agree="True")).status_code, 404)
self.client.force_login(self.user)
self.assertEqual(self.client.get(url_see).status_code, 200)
self.assertEqual(self.client.get(url_get).status_code, 200)
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment