tests: Add missing logins in InviteOnlyStreamTest.

This test case was supposed to be making requests as 2 different
users, but was not logging in as each of them and thus used the wrong
credentials.

(imported from commit 0dfdc86fcb385d3d2a721181b2f8075bc39ad723)
This commit is contained in:
Jessica McKellar 2013-02-04 16:32:18 -05:00
parent a9f5513181
commit a1506779ca
1 changed files with 2 additions and 0 deletions

View File

@ -1388,11 +1388,13 @@ class InviteOnlyStreamTest(AuthedTestCase):
# Subscribing oneself to an invite-only stream is not allowed
email = "othello@humbughq.com"
self.login(email)
result = self.common_subscribe_to_stream(email, '["Saxony"]')
self.assert_json_error(result, "Unable to join an invite-only stream")
# Inviting another user to an invite-only stream is allowed
email = 'hamlet@humbughq.com'
self.login(email)
result = self.common_subscribe_to_stream(
email, '["Saxony"]',
extra_post_data={'principals': simplejson.dumps(["othello@humbughq.com"])})