mirror of https://github.com/zulip/zulip.git
Replace /json/get_profile with REST style route.
This commit is contained in:
parent
679b4e5807
commit
b8ec8f5ef0
|
@ -262,8 +262,8 @@ function unconditionally_send_pointer_update() {
|
||||||
}
|
}
|
||||||
|
|
||||||
function fast_forward_pointer() {
|
function fast_forward_pointer() {
|
||||||
channel.post({
|
channel.get({
|
||||||
url: '/json/get_profile',
|
url: '/users/me',
|
||||||
idempotent: true,
|
idempotent: true,
|
||||||
data: {email: page_params.email},
|
data: {email: page_params.email},
|
||||||
success: function (data) {
|
success: function (data) {
|
||||||
|
|
|
@ -1078,14 +1078,14 @@ class GetProfileTest(AuthedTestCase):
|
||||||
|
|
||||||
def test_api_get_empty_profile(self):
|
def test_api_get_empty_profile(self):
|
||||||
"""
|
"""
|
||||||
Ensure get_profile returns a max message id and returns successfully
|
Ensure GET /users/me returns a max message id and returns successfully
|
||||||
"""
|
"""
|
||||||
json = self.common_get_profile("othello@zulip.com")
|
json = self.common_get_profile("othello@zulip.com")
|
||||||
self.assertEqual(json["pointer"], -1)
|
self.assertEqual(json["pointer"], -1)
|
||||||
|
|
||||||
def test_profile_with_pointer(self):
|
def test_profile_with_pointer(self):
|
||||||
"""
|
"""
|
||||||
Ensure get_profile returns a proper pointer id after the pointer is updated
|
Ensure GET /users/me returns a proper pointer id after the pointer is updated
|
||||||
"""
|
"""
|
||||||
|
|
||||||
id1 = self.send_message("othello@zulip.com", "Verona", Recipient.STREAM)
|
id1 = self.send_message("othello@zulip.com", "Verona", Recipient.STREAM)
|
||||||
|
|
Loading…
Reference in New Issue