2021-01-15 00:10:45 +00:00
|
|
|
import { TEST_HOST } from 'helpers/test_constants';
|
2020-07-16 03:09:12 +00:00
|
|
|
|
2018-11-27 15:10:40 +00:00
|
|
|
function getDate(daysMinus) {
|
|
|
|
const today = new Date();
|
|
|
|
today.setDate(today.getDate() - daysMinus);
|
|
|
|
|
|
|
|
return today.toISOString();
|
|
|
|
}
|
|
|
|
|
|
|
|
export default () => ({
|
|
|
|
id: 1,
|
|
|
|
iid: 1,
|
|
|
|
state: 'opened',
|
|
|
|
upvotes: 1,
|
|
|
|
userNotesCount: 2,
|
|
|
|
closedAt: getDate(1),
|
|
|
|
createdAt: getDate(3),
|
|
|
|
updatedAt: getDate(2),
|
|
|
|
confidential: false,
|
2020-07-16 03:09:12 +00:00
|
|
|
webUrl: `${TEST_HOST}/test/issue/1`,
|
2018-11-27 15:10:40 +00:00
|
|
|
title: 'Test issue',
|
|
|
|
author: {
|
2020-07-16 03:09:12 +00:00
|
|
|
avatarUrl: `${TEST_HOST}/avatar`,
|
2018-11-27 15:10:40 +00:00
|
|
|
name: 'Author Name',
|
|
|
|
username: 'author.username',
|
2020-07-16 03:09:12 +00:00
|
|
|
webUrl: `${TEST_HOST}/author`,
|
2018-11-27 15:10:40 +00:00
|
|
|
},
|
|
|
|
});
|