Skip to content

Commit

Permalink
Add posts.show route
Browse files Browse the repository at this point in the history
`ember g route posts/show`

Outer red: Title not found

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
Josh Justice committed Apr 12, 2018
1 parent 2e08236 commit 7b01bf0
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 0 deletions.
1 change: 1 addition & 0 deletions app/router.js
Expand Up @@ -9,6 +9,7 @@ const Router = EmberRouter.extend({
Router.map(function() {
this.route('posts', function() {
this.route('new');
this.route('show');
});
});

Expand Down
4 changes: 4 additions & 0 deletions app/routes/posts/show.js
@@ -0,0 +1,4 @@
import Route from '@ember/routing/route';

export default Route.extend({
});
1 change: 1 addition & 0 deletions app/templates/posts/show.hbs
@@ -0,0 +1 @@
{{outlet}}
11 changes: 11 additions & 0 deletions tests/unit/routes/posts/show-test.js
@@ -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 7b01bf0

Please sign in to comment.