Skip to content

Commit

Permalink
Added additional test
Browse files Browse the repository at this point in the history
  • Loading branch information
ab623 committed Apr 17, 2024
1 parent cacd534 commit cfeab75
Showing 1 changed file with 13 additions and 1 deletion.
14 changes: 13 additions & 1 deletion bookmarks/tests/test_bookmark_new_view.py
Original file line number Diff line number Diff line change
Expand Up @@ -211,7 +211,7 @@ def test_should_hide_notes_if_there_are_no_notes(self):

self.assertContains(response, '<details class="notes">', count=1)

def test_should_set_mark_unread_to_user_set_option(self):
def test_should_set_mark_unread_to_user_set_option_as_true(self):
self.user.profile.default_mark_unread = True
self.user.profile.save()

Expand All @@ -223,3 +223,15 @@ def test_should_set_mark_unread_to_user_set_option(self):
'id="id_unread" checked="">',
html,
)

def test_should_set_mark_unread_to_user_set_option_as_false(self):
self.user.profile.default_mark_unread = False
self.user.profile.save()

response = self.client.get(reverse("bookmarks:new"))
html = response.content.decode()

self.assertInHTML(
'<input type="checkbox" name="unread" id="id_unread">',
html,
)

0 comments on commit cfeab75

Please sign in to comment.