mirror of https://github.com/zulip/zulip.git
Fix confusion of type_id and type in tests
test_successful_subscriptions_notifies_pm and test_successful_subscriptions_notifies_stream were both asserting type_id and not type with the Recipient.PERSONAL and Recipient.STREAM values. (imported from commit 26492f9c725c278ac81570a135dc9cc203213cbd)
This commit is contained in:
parent
759d33fad1
commit
6d332151d2
|
@ -2085,7 +2085,7 @@ class SubscriptionAPITest(AuthedTestCase):
|
|||
self.assert_json_success(result)
|
||||
|
||||
msg = Message.objects.latest('id')
|
||||
self.assertEqual(msg.recipient.type_id, Recipient.PERSONAL)
|
||||
self.assertEqual(msg.recipient.type, Recipient.PERSONAL)
|
||||
self.assertEqual(msg.sender_id,
|
||||
get_user_profile_by_email('notification-bot@zulip.com').id)
|
||||
expected_msg = "Hi there! %s just created a new stream '%s'. " \
|
||||
|
@ -2123,7 +2123,7 @@ class SubscriptionAPITest(AuthedTestCase):
|
|||
self.assert_json_success(result)
|
||||
|
||||
msg = Message.objects.latest('id')
|
||||
self.assertEqual(msg.recipient.type_id, Recipient.STREAM)
|
||||
self.assertEqual(msg.recipient.type, Recipient.STREAM)
|
||||
self.assertEqual(msg.sender_id,
|
||||
get_user_profile_by_email('notification-bot@zulip.com').id)
|
||||
expected_msg = "%s just created a new stream `%s`. " \
|
||||
|
|
Loading…
Reference in New Issue