Use _.uniqueId() instead of Math.random() for dummy badges
This commit is contained in:
parent
a78c443de2
commit
b4dc978d01
|
@ -1,8 +1,9 @@
|
|||
import _ from 'underscore';
|
||||
import { PROJECT_BADGE } from '~/badges/constants';
|
||||
import { DUMMY_IMAGE_URL, TEST_HOST } from 'spec/test_constants';
|
||||
|
||||
export const createDummyBadge = () => {
|
||||
const id = Math.floor(1000 * Math.random());
|
||||
const id = _.uniqueId();
|
||||
return {
|
||||
id,
|
||||
imageUrl: `${TEST_HOST}/badges/${id}/image/url`,
|
||||
|
|
Loading…
Reference in New Issue