Created
June 30, 2017 10:38
-
-
Save samselikoff/46e2620dbea6a49549b61cc478975e6f to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { Factory, faker, trait } from 'ember-cli-mirage'; | |
export default Factory.extend({ | |
title() { | |
return `Series ${faker.lorem.words()}`; | |
}, | |
slug() { | |
return faker.helpers.slugify(faker.lorem.words()); | |
}, | |
subtitle() { | |
return faker.lorem.sentence(); | |
}, | |
description() { | |
return faker.lorem.sentence(); | |
}, | |
gradientPrimary: '#ff00cc', | |
gradientSecondary: '#333399', | |
posterUrl: 'https://dl.dropboxusercontent.com/u/8604053/ember-map/acceptance-testing.jpg', | |
withClips: trait({ | |
afterCreate(series, server) { | |
server.create('clip', 'withEncodes', { series, title: 'Intro' }); | |
server.create('clip', 'withEncodes', { series, viewingRequirement: 'subscription', title: 'Paid 1' }); | |
server.create('clip', 'withEncodes', { series, viewingRequirement: 'subscription', title: 'Paid 2' }); | |
server.create('clip', 'withEncodes', { series, viewingRequirement: 'account', title: 'Email wall 1' }); | |
server.create('clip', 'withEncodes', { series, viewingRequirement: 'subscription', comingSoon: true, title: 'Coming soon' }); | |
} | |
}) | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment