Updates and tests outgoing reject
This commit is contained in:
parent
a567bd4e61
commit
75c695b3c6
4 changed files with 28 additions and 6 deletions
|
@ -52,3 +52,21 @@ class Following(TestCase):
|
|||
)
|
||||
# follow relationship should exist
|
||||
self.assertEqual(self.remote_user.followers.first(), self.local_user)
|
||||
|
||||
|
||||
def test_handle_reject(self):
|
||||
rel = models.UserFollowRequest.objects.create(
|
||||
user_subject=self.local_user,
|
||||
user_object=self.remote_user
|
||||
)
|
||||
rel_id = rel.id
|
||||
|
||||
outgoing.handle_reject(rel)
|
||||
# request should be deleted
|
||||
self.assertEqual(
|
||||
models.UserFollowRequest.objects.filter(id=rel_id).count(), 0
|
||||
)
|
||||
# follow relationship should not exist
|
||||
self.assertEqual(
|
||||
models.UserFollows.objects.filter(id=rel_id).count(), 0
|
||||
)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue