Skip to content

Commit

Permalink
#1 added documentation to test
Browse files Browse the repository at this point in the history
  • Loading branch information
Wizkas0 committed Mar 5, 2021
1 parent 4d94322 commit b909c12
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions wger/exercises/tests/test_exercise.py
Original file line number Diff line number Diff line change
Expand Up @@ -386,12 +386,14 @@ def test_add_exercise_success(self):

def test_notification_email_contains_name(self):
"""
Tests adding/editing an exercise with a user with enough rights to do this
Tests that the email notification contains the correct information
"""
username = 'test'
exercise_name = "Kalle"
self.user_login('test')
self.user_login(username)
self.add_exercise_success(name_original=exercise_name)
self.assertEquals(mail.outbox[0].body, "The user test submitted a new exercise \"" + exercise_name + "\".")
self.assertEquals(mail.outbox[0].body, "The user " + username +
" submitted a new exercise \"" + exercise_name + "\".")

def test_add_exercise_user_no_rights(self):
"""
Expand Down

0 comments on commit b909c12

Please sign in to comment.