Testing Promises with Jasmine - Provide and Spy
Jasmine provides a few more tools when dealing with promises. Consider the following controller:
Lets see how to test these two promises with the help of $provide to create fake implementations of our
dependencies and jasmine’s spies to fake results and be informed when a function was called.
Follow the code’s comments to understand how to utilize these two concepts.