Update Folder creation and Tag creation API calls to return the id of the created instances.

This commit is contained in:
Roberto Rosario
2016-03-14 04:48:22 -04:00
parent 35cc0ea1d6
commit 858648782b
5 changed files with 30 additions and 13 deletions

View File

@@ -34,10 +34,13 @@ class FolderAPITestCase(APITestCase):
)
def test_folder_create(self):
self.client.post(
response = self.client.post(
reverse('rest_api:folder-list'), {'label': TEST_FOLDER_LABEL}
)
self.assertEqual(response.data['id'], 1)
self.assertEqual(response.data['label'], TEST_FOLDER_LABEL)
folder = Folder.objects.first()
self.assertEqual(Folder.objects.count(), 1)