Created
October 31, 2013 01:13
-
-
Save zdwolfe/7243011 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
'use strict'; | |
describe('Controller: ContentCtrl', function () { | |
// load the controller's module | |
beforeEach(module('librecmsApp')); | |
// load controller widgets/views/partials | |
var views = [ | |
'views/course.item.list.html', | |
'views/main.html' | |
]; | |
views.forEach(function(view) { | |
beforeEach(module(view)); | |
}); | |
var ContentCtrl, scope; | |
// Initialize the controller and a mock scope | |
beforeEach(inject(function ($controller, $rootScope) { | |
scope = $rootScope.$new(); | |
ContentCtrl = $controller('ContentCtrl', { | |
$scope: scope | |
}); | |
})); | |
it('should have a list of assignments', | |
inject(function($state, $stateParams, CourseService, $rootScope) { | |
$state.transitionTo('main.course-assignment-list', { | |
courseId: '1234' | |
}); | |
$rootScope.$apply(); | |
expect($state.current.name).toBe('main.course-assignment-list'); | |
})); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment