Add Suspend User to flags page
This commit is contained in:
@@ -107,6 +107,14 @@ QUnit.test("flagged posts - delete + deleteSpammer", assert => {
|
||||
});
|
||||
});
|
||||
|
||||
QUnit.test("flagged posts - suspend", assert => {
|
||||
visit("/admin/flags/active");
|
||||
click('.suspend-user');
|
||||
andThen(() => {
|
||||
assert.equal(find('.suspend-user-modal:visible').length, 1);
|
||||
assert.equal(find('.suspend-user-modal .cant-suspend').length, 1);
|
||||
});
|
||||
});
|
||||
|
||||
QUnit.test("topics with flags", assert => {
|
||||
visit("/admin/flags/topics");
|
||||
|
||||
@@ -63,3 +63,4 @@ QUnit.test("suspend, then unsuspend a user", assert => {
|
||||
assert.ok(!exists('.suspension-info'));
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
@@ -350,13 +350,21 @@ export default function() {
|
||||
|
||||
this.get('/tag_groups', () => response(200, {tag_groups: []}));
|
||||
|
||||
this.get('/admin/users/1234.json', request => {
|
||||
this.get('/admin/users/1234.json', () => {
|
||||
return response(200, {
|
||||
id: 1234,
|
||||
username: 'regular',
|
||||
});
|
||||
});
|
||||
|
||||
this.get('/admin/users/2.json', () => {
|
||||
return response(200, {
|
||||
id: 2,
|
||||
username: 'sam',
|
||||
admin: true
|
||||
});
|
||||
});
|
||||
|
||||
this.post('/admin/users/:user_id/generate_api_key', success);
|
||||
this.delete('/admin/users/:user_id/revoke_api_key', success);
|
||||
this.delete('/admin/users/:user_id.json', () => response(200, { deleted: true }));
|
||||
|
||||
Reference in New Issue
Block a user