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 1d73f62 commit 6c2eed2475bec9854b22f3ccd7705bfc10816f52
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 6c2eed2

Please sign in to comment.