【发布时间】:2015-07-31 01:38:05
【问题描述】:
使用$httpBackend,如何将expectGET 与具有查询参数的网址一起使用?顺序无所谓,价值无所谓。
$httpBackend
.expectGET('/api/my_endpoint/example?X=false&Y=someethingelse&Z=anotherthing')
.respond(200, {});
使用$resource 我是这样声明的:
get: {
method: 'GET',
url: '/api/my_endpoint/example',
params: {
X: '@X',
Y: '@Y',
Z: '@Z',
}
}
【问题讨论】:
标签: angularjs unit-testing httpbackend