diff --git a/pagure/templates/pull_request.html b/pagure/templates/pull_request.html index 330b127..2a6a650 100644 --- a/pagure/templates/pull_request.html +++ b/pagure/templates/pull_request.html @@ -1186,15 +1186,14 @@ $(document).ready(function () { } } ); + {% endif %} $.get("{{ url_for('api_ns.api_users') }}", { pattern: '*' }).done(function(resp) { $("#comment").mention({ - data: resp['mention'] + users: resp['mention'] }); }); - {% endif %} - } ); $(window).on('hashchange', updateHighlight); var selected = []; diff --git a/tests/test_pagure_flask_api.py b/tests/test_pagure_flask_api.py index 6432d07..f3e627d 100644 --- a/tests/test_pagure_flask_api.py +++ b/tests/test_pagure_flask_api.py @@ -54,14 +54,14 @@ class PagureFlaskApitests(tests.Modeltests): self.assertEqual(output.status_code, 200) data = json.loads(output.data) self.assertEqual(sorted(data['users']), ['foo', 'pingou']) - self.assertEqual(sorted(data.keys()), ['total_users', 'users']) + self.assertEqual(sorted(data.keys()), ['mention', 'total_users', 'users']) self.assertEqual(data['total_users'], 2) output = self.app.get('/api/0/users?pattern=p') self.assertEqual(output.status_code, 200) data = json.loads(output.data) self.assertEqual(data['users'], ['pingou']) - self.assertEqual(sorted(data.keys()), ['total_users', 'users']) + self.assertEqual(sorted(data.keys()), ['mention', 'total_users', 'users']) self.assertEqual(data['total_users'], 1) def test_api_project_tags(self):