Skip to content

Instantly share code, notes, and snippets.

@zdwolfe
Created October 29, 2013 20:07
Show Gist options
  • Save zdwolfe/7221640 to your computer and use it in GitHub Desktop.
Save zdwolfe/7221640 to your computer and use it in GitHub Desktop.
'use strict';
describe('Controller: ContentCtrl', function () {
// load the controller's module
beforeEach(module('myApp'));
var ContentCtrl, scope, state, q;
// Initialize the controller and a mock scope
beforeEach(inject(function ($controller, $rootScope, $state, $q) {
scope = $rootScope.$new();
state = $state;
q = $q;
ContentCtrl = $controller('ContentCtrl', {
$scope: scope,
$state: $state
});
}));
it('should should have an empty test', function () {
state.go('main.course');
q.flush();
console.log('state.current = ' + JSON.stringify(state.current));
});
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment