mirror of
https://github.com/fleetdm/fleet
synced 2026-05-21 07:58:31 +00:00
* 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
25 lines
594 B
JavaScript
25 lines
594 B
JavaScript
import createRequestMock from "test/mocks/create_request_mock";
|
|
import { userStub } from "test/stubs";
|
|
|
|
export default {
|
|
create: {
|
|
valid: (bearerToken = "abc123", params) => {
|
|
return createRequestMock({
|
|
endpoint: "/api/latest/fleet/login",
|
|
method: "post",
|
|
params,
|
|
response: { token: bearerToken, user: userStub },
|
|
});
|
|
},
|
|
},
|
|
destroy: {
|
|
valid: (bearerToken) => {
|
|
return createRequestMock({
|
|
bearerToken,
|
|
endpoint: "/api/latest/fleet/logout",
|
|
method: "post",
|
|
response: {},
|
|
});
|
|
},
|
|
},
|
|
};
|