fleet/frontend/test/mocks/config_mocks.js
Martavis Parker a8d7b5478b
Updated API routes to use current format for frontend use (#5018)
* removed global api routes; using 'latest' instead of v1 for api routes

* lint fixes

* updated docs and tests

* lint fixes

* route fix

* fixed routes breaking packs queries

* revert test change
2022-04-11 13:04:38 -07:00

25 lines
557 B
JavaScript

import createRequestMock from "test/mocks/create_request_mock";
export default {
loadAll: {
valid: (bearerToken) => {
return createRequestMock({
bearerToken,
endpoint: "/api/latest/fleet/config",
method: "get",
response: { config: { name: "Fleet" } },
});
},
},
update: {
valid: (bearerToken, params) => {
return createRequestMock({
bearerToken,
endpoint: "/api/latest/fleet/config",
method: "patch",
params,
response: {},
});
},
},
};