mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-11-03 20:45:58 +01:00
Admin/users (#8762)
* feat: wip admin/users * feat: more work * feat: more fixes * feat: #8662, verified/unverified user groups * feat: add filter * feat: change user search to use filters array * refactor: remove unused search call * fix: tests * fix: cant join system groups * fix: upgrade script
This commit is contained in:
committed by
GitHub
parent
bfaeb27c11
commit
872bacf1c4
@@ -661,7 +661,7 @@ describe('Controllers', function () {
|
||||
});
|
||||
|
||||
it('should error if guests do not have search privilege', function (done) {
|
||||
request(nconf.get('url') + '/api/users?term=bar§ion=sort-posts', { json: true }, function (err, res, body) {
|
||||
request(nconf.get('url') + '/api/users?query=bar§ion=sort-posts', { json: true }, function (err, res, body) {
|
||||
assert.ifError(err);
|
||||
assert.equal(res.statusCode, 500);
|
||||
assert(body);
|
||||
@@ -673,7 +673,7 @@ describe('Controllers', function () {
|
||||
it('should load users search page', function (done) {
|
||||
privileges.global.give(['groups:search:users'], 'guests', function (err) {
|
||||
assert.ifError(err);
|
||||
request(nconf.get('url') + '/users?term=bar§ion=sort-posts', function (err, res, body) {
|
||||
request(nconf.get('url') + '/users?query=bar§ion=sort-posts', function (err, res, body) {
|
||||
assert.ifError(err);
|
||||
assert.equal(res.statusCode, 200);
|
||||
assert(body);
|
||||
@@ -1509,6 +1509,7 @@ describe('Controllers', function () {
|
||||
assert.ifError(err);
|
||||
request(nconf.get('url') + '/api/user/groupie', { json: true }, function (err, res, body) {
|
||||
assert.ifError(err);
|
||||
console.log(body);
|
||||
assert.equal(res.statusCode, 200);
|
||||
assert(Array.isArray(body.selectedGroup));
|
||||
assert.equal(body.selectedGroup[0].name, 'selectedGroup');
|
||||
|
||||
Reference in New Issue
Block a user