mirror of
https://github.com/sissbruecker/linkding.git
synced 2025-08-09 19:57:49 +02:00
Add option for marking bookmarks as unread by default (#706)
* Added new option to set Mark as unread with a default * Added additional test * tweak test a bit --------- Co-authored-by: Sascha Ißbrücker <sascha.issbruecker@gmail.com>
This commit is contained in:
@@ -210,3 +210,25 @@ class BookmarkNewViewTestCase(TestCase, BookmarkFactoryMixin):
|
||||
response = self.client.get(reverse("bookmarks:edit", args=[bookmark.id]))
|
||||
|
||||
self.assertContains(response, '<details class="notes">', count=1)
|
||||
|
||||
def test_should_not_check_unread_by_default(self):
|
||||
response = self.client.get(reverse("bookmarks:new"))
|
||||
html = response.content.decode()
|
||||
|
||||
self.assertInHTML(
|
||||
'<input type="checkbox" name="unread" id="id_unread">',
|
||||
html,
|
||||
)
|
||||
|
||||
def test_should_check_unread_when_configured_in_profile(self):
|
||||
self.user.profile.default_mark_unread = True
|
||||
self.user.profile.save()
|
||||
|
||||
response = self.client.get(reverse("bookmarks:new"))
|
||||
html = response.content.decode()
|
||||
|
||||
self.assertInHTML(
|
||||
'<input type="checkbox" name="unread" value="true" '
|
||||
'id="id_unread" checked="">',
|
||||
html,
|
||||
)
|
||||
|
Reference in New Issue
Block a user