Skip to content

Commit

Permalink
Add nav-bar component
Browse files Browse the repository at this point in the history
  • Loading branch information
bluSCALE4 committed Mar 2, 2016
1 parent dc4bb66 commit b9d10ee
Show file tree
Hide file tree
Showing 2 changed files with 33 additions and 5 deletions.
13 changes: 8 additions & 5 deletions app/templates/components/nav-bar.hbs
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
<nav>
<div class="header">
<div class="logo">
{{#link-to "application"}}Autism{{/link-to}}
</div>
<div class="nav">
<ul>
<li>Home</li>
<li>Cheat Sheets</li>
<li>{{#link-to "resources"}}Resources{{/link-to}}</li>
</ul>
</nav>
{{yield}}
</div>
</div>
25 changes: 25 additions & 0 deletions tests/integration/components/nav-bar-test.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
import { moduleForComponent, test } from 'ember-qunit';
import hbs from 'htmlbars-inline-precompile';

moduleForComponent('nav-bar', 'Integration | Component | nav bar', {
integration: true
});

test('it renders', function(assert) {

// Set any properties with this.set('myProperty', 'value');
// Handle any actions with this.on('myAction', function(val) { ... });" + EOL + EOL +

this.render(hbs`{{nav-bar}}`);

assert.equal(this.$().text().trim(), '');

// Template block usage:" + EOL +
this.render(hbs`
{{#nav-bar}}
template block text
{{/nav-bar}}
`);

assert.equal(this.$().text().trim(), 'template block text');
});

0 comments on commit b9d10ee

Please sign in to comment.