New client group finishes (#8899)

* Added challenges section

* Added public fields to guilds

* Added suggestion for habitica help guild

* Added categoires to group

* Added guild category filters

* Added guild filter by member count

* Removed console.log

* Updated group count in tests to account for newly created groups
This commit is contained in:
Keith Holliday
2017-07-26 09:05:13 -06:00
committed by GitHub
parent 9071fa0073
commit 0b13ba822e
9 changed files with 288 additions and 75 deletions

View File

@@ -45,6 +45,20 @@ describe('PUT /group', () => {
expect(updatedGroup.name).to.equal(groupUpdatedName);
});
it('updates a group categories', async () => {
let categories = [{
slug: 'newCat',
name: 'New Category',
}];
let updatedGroup = await leader.put(`/groups/${groupToUpdate._id}`, {
categories,
});
expect(updatedGroup.categories[0].slug).to.eql(categories[0].slug);
expect(updatedGroup.categories[0].name).to.eql(categories[0].name);
});
it('allows an admin to update a guild', async () => {
let updatedGroup = await adminUser.put(`/groups/${groupToUpdate._id}`, {
name: groupUpdatedName,