I want to test the following scenario:
I have a scope:
var scope;
beforeEach(inject(function($rootScope) {
scope = $rootScope.$new();
}));
You need to test whether the assignment of a variable in the $ scope within an asynchronous function will already have passed the angle digest.
obj.save().then(function(obj) {
scope.obj = obj;
});
expect(scope.obj).not.toBe(null);
I do not know what to do, does anyone give a light?