mirror of
https://github.com/sudoxnym/habitica-self-host.git
synced 2026-08-03 04:29:40 +00:00
Corrected function
This commit is contained in:
parent
999e0188f2
commit
4853c0814d
2 changed files with 3 additions and 3 deletions
|
|
@ -1,6 +1,6 @@
|
|||
'use strict';
|
||||
|
||||
describe('Groups Controller', function() {
|
||||
describe.only('Groups Controller', function() {
|
||||
var scope, ctrl, groups, user, guild, $rootScope;
|
||||
|
||||
beforeEach(function() {
|
||||
|
|
@ -48,7 +48,7 @@ describe('Groups Controller', function() {
|
|||
return [];
|
||||
});
|
||||
|
||||
expect(scope.isMemberOfGroup(user._id, guild)).to.not.be.eql(true);
|
||||
expect(scope.isMemberOfGroup(user._id, guild)).to.be.eql(false);
|
||||
expect(myGuilds).to.be.called
|
||||
});
|
||||
});
|
||||
|
|
|
|||
|
|
@ -20,7 +20,7 @@ habitrpg.controller("GroupsCtrl", ['$scope', '$rootScope', 'Shared', 'Groups', '
|
|||
// If the group is a guild, just check for an intersection with the
|
||||
// current user's guilds, rather than checking the members of the group.
|
||||
if(group.type === 'guild') {
|
||||
return _.detect(Groups.myGuilds(), function(g) { return g._id === group._id });
|
||||
return _.detect(Groups.myGuilds(), function(g) { return g._id === group._id }) ? true : false;
|
||||
}
|
||||
|
||||
if (!group.members) return false;
|
||||
|
|
|
|||
Loading…
Reference in a new issue