[mocks][m]: setup CKAN api mocks with the new apollo setup.

This commit is contained in:
anuveyatsu
2020-06-23 10:43:53 +06:00
parent 50119bf33f
commit 55d9c68b34
4 changed files with 39 additions and 20 deletions

View File

@@ -66,9 +66,7 @@ module.exports.initMocks = function () {
nock('http://mock.ckan/api/3/action', { encodedQueryParams: true })
.persist()
// 1. Call without query.
.get(
'/package_search?facet.field=organization&facet.field=groups&facet.field=tags&facet.field=res_format&facet.field=license_id&facet.limit=5'
)
.get('/package_search?')
.reply(200, {
success: true,
result: {
@@ -80,9 +78,7 @@ module.exports.initMocks = function () {
},
})
// 2. Call with `q=gdp` query.
.get(
'/package_search?q=gdp&facet.field=organization&facet.field=groups&facet.field=tags&facet.field=res_format&facet.field=license_id&facet.limit=5'
)
.get('/package_search?q=gdp')
.reply(200, {
success: true,
result: {