Permalink
Browse files

Add posts.show route

`ember g route posts/show`

Outer red:
✘ Element .js-post-detail-title exists
✘ Element .js-post-detail-body exists

Now the acceptance test is able to display the `posts.show` route, but it can't find the post's title on the page, because we aren't rendering anything to the screen yet.
  • Loading branch information...
CodingItWrong committed Jan 11, 2018
1 parent 40622c3 commit 89b2f3bba8399fca9b3161833184a3c8bde30c84
Showing with 17 additions and 0 deletions.
  1. +1 −0 app/router.js
  2. +4 −0 app/routes/posts/show.js
  3. +1 −0 app/templates/posts/show.hbs
  4. +11 −0 tests/unit/routes/posts/show-test.js
@@ -9,6 +9,7 @@ const Router = EmberRouter.extend({
Router.map(function() {
this.route('posts', function() {
this.route('new');
this.route('show');
});
});
@@ -0,0 +1,4 @@
import Route from '@ember/routing/route';
export default Route.extend({
});
@@ -0,0 +1 @@
{{outlet}}
@@ -0,0 +1,11 @@
import { moduleFor, test } from 'ember-qunit';
moduleFor('route:posts/show', 'Unit | Route | posts/show', {
// Specify the other units that are required for this test.
// needs: ['controller:foo']
});
test('it exists', function(assert) {
let route = this.subject();
assert.ok(route);
});

0 comments on commit 89b2f3b

Please sign in to comment.