test(controller): instantiate controller defined on window

Just adding a missing spec.
This commit is contained in:
Vojta Jina 2013-04-30 11:48:59 -07:00
parent de2cdb0658
commit e295eeefaa

View file

@ -90,6 +90,18 @@ describe('$controller', function() {
});
it('should instantiate controller defined on window', inject(function($window) {
var scope = {};
var Foo = function() {};
$window.a = {Foo: Foo};
var foo = $controller('a.Foo', {$scope: scope});
expect(foo).toBeDefined();
expect(foo instanceof Foo).toBe(true);
}));
describe('ctrl as syntax', function() {
it('should publish controller instance into scope', function() {