Sebastian Kippe 2008ed5634 Refactor categories into rootListing
This uses proper paths with slashes everywhere, and lists documents
instead of just folders for root.
2017-11-12 20:46:31 +01:00

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');
});