This uses proper paths with slashes everywhere, and lists documents instead of just folders for root.
18 lines
507 B
JavaScript
18 lines
507 B
JavaScript
import { moduleForComponent, test } from 'ember-qunit';
|
|
import hbs from 'htmlbars-inline-precompile';
|
|
|
|
moduleForComponent('categories-nav', 'Integration | Component | categories nav', {
|
|
integration: true
|
|
});
|
|
|
|
test('it renders categories', function(assert) {
|
|
this.set('categories', [
|
|
{ name: 'documents', path: 'documents/' },
|
|
{ name: 'notes', path: 'notes/' }
|
|
]);
|
|
|
|
this.render(hbs`{{categories-nav categories=categories}}`);
|
|
|
|
assert.equal(this.$('ul li:first a').text(), 'documents');
|
|
});
|