diff --git a/test/spec/groupCtrlSpec.js b/test/spec/groupCtrlSpec.js index e59d4ffe29..6fe9022f65 100644 --- a/test/spec/groupCtrlSpec.js +++ b/test/spec/groupCtrlSpec.js @@ -1,6 +1,6 @@ 'use strict'; -describe.only('Groups Controller', function() { +describe('Groups Controller', function() { var scope, ctrl, groups, user, guild, $rootScope; beforeEach(function() { @@ -34,7 +34,7 @@ describe.only('Groups Controller', function() { return [guild]; }); - expect(scope.isMemberOfGroup(user._id, guild)).to.be.eql(true); + expect(scope.isMemberOfGroup(user._id, guild)).to.be.ok; expect(myGuilds).to.be.called }); @@ -48,7 +48,7 @@ describe.only('Groups Controller', function() { return []; }); - expect(scope.isMemberOfGroup(user._id, guild)).to.be.eql(false); + expect(scope.isMemberOfGroup(user._id, guild)).to.not.be.ok; expect(myGuilds).to.be.called }); }); diff --git a/website/public/js/controllers/groupsCtrl.js b/website/public/js/controllers/groupsCtrl.js index 334ebca87d..50d137da3a 100644 --- a/website/public/js/controllers/groupsCtrl.js +++ b/website/public/js/controllers/groupsCtrl.js @@ -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 }) ? true : false; + return _.detect(Groups.myGuilds(), function(g) { return g._id === group._id }); } if (!group.members) return false;