I am building an application using Angular JS. As I am new to it I don't know much about writing test cases in it.
Suppose I have a service:
angular.module('MyApp').
factory('MainPage', function($resource,BASE_URL){
return $resource("my api call", {}, {query: {method:'GET'}, isArray:true});
}).
My Controller:
var app = angular.module('MyApp')
app.controller('MainCtrl',function($scope,MainPage,$rootScope){
$scope.mainpage = MainPage.query();
});
How I write test case for this controller in Angular JS using Jasmine.