How to use the ember-data-factory-guy.belongsTo function in ember-data-factory-guy

To help you get started, we’ve selected a few ember-data-factory-guy examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github CenterForOpenScience / ember-osf / test-support / factories / draft-registration.js View on Github external
import FactoryGuy from 'ember-data-factory-guy';
import faker from 'faker';

FactoryGuy.define('draft-registration', {
    default: {
        registrationSupplement: () => faker.lorem.words(1),
        datetimeInitiated: () => faker.date.past(1),
        datetimeUpdated: () => faker.date.recent(),
        branchedFrom: FactoryGuy.belongsTo('node'),
        initiator: FactoryGuy.belongsTo('user'),
        registrationSchema: FactoryGuy.belongsTo('metaschema')
    }
});