Skip to content

Commit

Permalink
Add test for getting specific medium
Browse files Browse the repository at this point in the history
  • Loading branch information
johannaengland committed Sep 20, 2023
1 parent 97c1274 commit 65226b2
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions tests/notificationprofile/test_views.py
Original file line number Diff line number Diff line change
Expand Up @@ -329,6 +329,11 @@ def test_should_get_all_media(self):
self.assertEqual(len(response.data), 2)
self.assertEqual(set([medium["slug"] for medium in response.data]), set(["sms", "email"]))

def test_should_get_specific_medium(self):
response = self.user1_rest_client.get(path=f"/api/v2/notificationprofiles/media/email/")
self.assertEqual(response.status_code, status.HTTP_200_OK, response.data)
self.assertEqual(response.data["slug"], "email")


@tag("API", "integration")
class DestinationViewTests(APITestCase):
Expand Down

0 comments on commit 65226b2

Please sign in to comment.