2021-04-12 13:32:25 +00:00
|
|
|
import createRequestMock from "test/mocks/create_request_mock";
|
2017-03-02 22:07:01 +00:00
|
|
|
|
|
|
|
export default {
|
|
|
|
create: {
|
|
|
|
valid: (bearerToken, params) => {
|
|
|
|
return createRequestMock({
|
|
|
|
bearerToken,
|
2021-04-12 13:32:25 +00:00
|
|
|
endpoint: "/api/v1/fleet/invites",
|
|
|
|
method: "post",
|
2017-03-02 22:07:01 +00:00
|
|
|
params,
|
|
|
|
response: { invite: params },
|
|
|
|
});
|
|
|
|
},
|
|
|
|
},
|
|
|
|
loadAll: {
|
|
|
|
valid: (bearerToken) => {
|
|
|
|
return createRequestMock({
|
|
|
|
bearerToken,
|
2021-04-14 16:52:15 +00:00
|
|
|
endpoint: "/api/v1/fleet/invites?page=0&per_page=100",
|
|
|
|
method: "get",
|
2021-04-09 10:44:57 +00:00
|
|
|
response: { invites: [] },
|
|
|
|
});
|
|
|
|
},
|
|
|
|
validWithParams: (bearerToken) => {
|
|
|
|
return createRequestMock({
|
|
|
|
bearerToken,
|
2021-04-14 16:52:15 +00:00
|
|
|
endpoint:
|
|
|
|
"/api/v1/fleet/invites?page=3&per_page=100&&order_key=name&order_direction=desc&query=testQuery",
|
2021-04-12 13:32:25 +00:00
|
|
|
method: "get",
|
2017-03-02 22:07:01 +00:00
|
|
|
response: { invites: [] },
|
|
|
|
});
|
|
|
|
},
|
|
|
|
},
|
|
|
|
destroy: {
|
|
|
|
valid: (bearerToken, invite) => {
|
|
|
|
return createRequestMock({
|
|
|
|
bearerToken,
|
2021-02-10 20:13:11 +00:00
|
|
|
endpoint: `/api/v1/fleet/invites/${invite.id}`,
|
2021-04-12 13:32:25 +00:00
|
|
|
method: "delete",
|
2017-03-02 22:07:01 +00:00
|
|
|
response: {},
|
|
|
|
});
|
|
|
|
},
|
|
|
|
},
|
|
|
|
};
|