$httpBackend.whenGET('/restpath/api/v1/books')
.respond({// some data});
次のエラーが表示されます
Error: Unexpected request: GET /restpath/api/v1/books
Expected GET /restpath/api/v1/books?limit=10&start=1
expectGET の場合、次のものがあります。これにより、動的クエリ文字列が作成されます。主に「開始」パラメーターと whenGET 部分で、「開始」に応じて動的コンテンツをサーバーに送信しようとしています。
$httpBackend.expectGET('/restpath/api/v1/books?limit=10&start=1');
// the actual service goes here , which does the $http service. we don't care
$httpBackend.flush();