mirror of
https://github.com/bookwyrm-social/bookwyrm.git
synced 2024-12-15 12:46:38 +00:00
Test updating a progress
Also remove spurious whitespace change
This commit is contained in:
parent
6455cc7fe9
commit
9ed7d23000
2 changed files with 13 additions and 0 deletions
|
@ -210,6 +210,7 @@ class Quotation(Status):
|
|||
activity_serializer = activitypub.Quotation
|
||||
pure_activity_serializer = activitypub.Note
|
||||
|
||||
|
||||
class Review(Status):
|
||||
''' a book review '''
|
||||
name = models.CharField(max_length=255, null=True)
|
||||
|
|
|
@ -58,3 +58,15 @@ class ReadThrough(TestCase):
|
|||
self.assertEqual(len(progress_updates), 1)
|
||||
self.assertEqual(progress_updates[0].mode, models.ProgressMode.PAGE)
|
||||
self.assertEqual(progress_updates[0].progress, 50)
|
||||
|
||||
# Update progress
|
||||
self.client.post('/edit-readthrough', {
|
||||
'id': readthroughs[0].id,
|
||||
'pages_read': 100,
|
||||
})
|
||||
|
||||
progress_updates = readthroughs[0].progressupdate_set\
|
||||
.order_by('updated_date').all()
|
||||
self.assertEqual(len(progress_updates), 2)
|
||||
self.assertEqual(progress_updates[1].mode, models.ProgressMode.PAGE)
|
||||
self.assertEqual(progress_updates[1].progress, 100)
|
||||
|
|
Loading…
Reference in a new issue