| describe('The User List', () => { |
| var scope, element, isolatedScope, httpBackend; |
| beforeEach(module('xos.truckroll')); |
| beforeEach(module('templates')); |
| beforeEach(inject(function($httpBackend, $compile, $rootScope){ |
| httpBackend = $httpBackend; |
| // Setting up mock request |
| $httpBackend.expectGET('/api/tenant/cord/subscriber/?no_hyperlinks=1').respond([ |
| scope = $rootScope.$new(); |
| element = angular.element('<truckroll></truckroll>'); |
| $compile(element)(scope); |
| isolatedScope = element.isolateScope().vm; |
| it('should load 1 subscriber', () => { |
| expect(isolatedScope.subscribers.length).toBe(1); |