I have these models in an ember-cli application:
var PuzzleRound = DS.Model.extend({ year: DS.attr('number') }); var Puzzle = DS.Model.extend({ puzzleRounds: DS.hasMany('puzzleRound', {async: true}) });
And here is my test from tests/unit/models/puzzle-test.js :
import { moduleForModel, test } from 'ember-qunit'; import PuzzleRound from 'weather-roulette/models/puzzle-round'; moduleForModel('puzzle', 'Puzzle', { // Specify the other units that are required for this test. needs: ['model:puzzleRound'] }); test('it exists', function() { var model = this.subject(); // var store = this.store(); ok(!!model); });
I get this error when running ember test :
Attempting to register an unknown factory: `model:puzzleRound`
I am using ember-cli 0.1.1, Ember.js 1.7.0, Ember Data 1.0.0-beta.11. Anyone have anything that I can try to fix?
nnyby source share