Organized spec folder

This commit is contained in:
Blade Barringer
2015-06-13 09:58:08 -05:00
parent 5d56bd02ef
commit 719907189f
14 changed files with 3 additions and 3 deletions
+41
View File
@@ -0,0 +1,41 @@
'use strict';
describe('groupServices', function() {
var $httpBackend, $http, groups;
beforeEach(function() {
module(function($provide) {
$provide.value('User', {});
});
inject(function(_$httpBackend_, Groups, User) {
$httpBackend = _$httpBackend_;
groups = Groups;
});
});
it('calls party endpoint', function() {
$httpBackend.expectGET('/api/v2/groups/party').respond({});
groups.party();
$httpBackend.flush();
});
it('calls tavern endpoint', function() {
$httpBackend.expectGET('/api/v2/groups/habitrpg').respond({});
groups.tavern();
$httpBackend.flush();
});
it('calls public guilds endpoint', function() {
$httpBackend.expectGET('/api/v2/groups?type=public').respond([]);
groups.publicGuilds();
$httpBackend.flush();
});
it('calls my guilds endpoint', function() {
$httpBackend.expectGET('/api/v2/groups?type=guilds').respond([]);
groups.myGuilds();
$httpBackend.flush();
});
});