3 describe('Controller: MainCtrl', function() {
5 // load the controller's module
6 beforeEach(module('dashboardApp'));
7 beforeEach(module('stateMock'));
14 // Initialize the controller and a mock scope
15 beforeEach(inject(function(_$httpBackend_, $controller, $rootScope, $state) {
16 $httpBackend = _$httpBackend_;
17 $httpBackend.expectGET('/api/shows')
18 .respond(['HTML5 Boilerplate', 'AngularJS', 'Karma', 'Express']);
20 scope = $rootScope.$new();
22 MainCtrl = $controller('MainCtrl', {
27 it('should attach a list of shows to the scope', function() {
29 expect(scope.awesomeThings.length).toBe(4);