Skip to content
Permalink
Browse files

Add post model

`ember g model post`

Outer red: Your Ember app tried to POST '/posts', but there was no route defined to handle this request. Define a route that matches this path in your mirage/config.js file.

Next we get an error from Mirage, our fake server. It needs a corresponding post creation endpoint created.
  • Loading branch information...
CodingItWrong committed Jan 11, 2018
1 parent f31e9a9 commit 99db9049bea8eece7ee1e14ddaa24713fa084f16
Showing with 17 additions and 0 deletions.
  1. +5 −0 app/models/post.js
  2. +12 −0 tests/unit/models/post-test.js
@@ -0,0 +1,5 @@
import DS from 'ember-data';

export default DS.Model.extend({

});
@@ -0,0 +1,12 @@
import { moduleForModel, test } from 'ember-qunit';

moduleForModel('post', 'Unit | Model | post', {
// Specify the other units that are required for this test.
needs: []
});

test('it exists', function(assert) {
let model = this.subject();
// let store = this.store();
assert.ok(!!model);
});

0 comments on commit 99db904

Please sign in to comment.
You can’t perform that action at this time.