mirror of
https://github.com/HabitRPG/habitica.git
synced 2025-12-18 23:27:26 +01:00
Put isMemberOfGroup in its own describe block
This commit is contained in:
@@ -23,7 +23,8 @@ describe('Groups Controller', function() {
|
||||
});
|
||||
});
|
||||
|
||||
it("isMemberOfGroup returns true if group is the user's party", function() {
|
||||
describe("isMemberOfGroup", function() {
|
||||
it("returns true if group is the user's party", function() {
|
||||
party = specHelper.newGroup("test-party");
|
||||
party._id = "unique-party-id";
|
||||
party.type = 'party';
|
||||
@@ -36,7 +37,7 @@ describe('Groups Controller', function() {
|
||||
expect(scope.isMemberOfGroup(user._id, party)).to.be.ok;
|
||||
});
|
||||
|
||||
it('isMemberOfGroup returns true if guild is included in myGuilds call', function(){
|
||||
it('returns true if guild is included in myGuilds call', function(){
|
||||
|
||||
guild = specHelper.newGroup("leaders-user-id");
|
||||
guild._id = "unique-guild-id";
|
||||
@@ -51,7 +52,7 @@ describe('Groups Controller', function() {
|
||||
expect(myGuilds).to.be.called
|
||||
});
|
||||
|
||||
it('isMemberOfGroup does not return true if guild is not included in myGuilds call', function(){
|
||||
it('does not return true if guild is not included in myGuilds call', function(){
|
||||
|
||||
guild = specHelper.newGroup("leaders-user-id");
|
||||
guild._id = "unique-guild-id";
|
||||
@@ -64,6 +65,7 @@ describe('Groups Controller', function() {
|
||||
expect(scope.isMemberOfGroup(user._id, guild)).to.not.be.ok;
|
||||
expect(myGuilds).to.be.called
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
describe("Autocomplete controller", function() {
|
||||
|
||||
Reference in New Issue
Block a user