debian-mirror-gitlab/spec/frontend/approvals/mock_data.js

11 lines
442 B
JavaScript
Raw Normal View History

2023-05-27 22:25:52 +05:30
import approvedByCurrentUser from 'test_fixtures/graphql/merge_requests/approvals/approvals.query.graphql.json';
export const createCanApproveResponse = () => {
const response = JSON.parse(JSON.stringify(approvedByCurrentUser));
response.data.project.mergeRequest.userPermissions.canApprove = true;
response.data.project.mergeRequest.approved = false;
response.data.project.mergeRequest.approvedBy.nodes = [];
return response;
};