Commit d8433217 authored by Luke "Jared" Bennett's avatar Luke "Jared" Bennett

Fix repo_sidebar_spec

parent c477ffbc
......@@ -23,7 +23,7 @@ describe('RepoSidebar', () => {
expect(thead.querySelector('.last-commit').textContent).toEqual('Last Commit');
expect(thead.querySelector('.last-update').textContent).toEqual('Last Update');
expect(tbody.querySelector('.repo-file-options')).toBeFalsy();
expect(tbody.querySelector('.prev-directory')).toBeTruthy();
expect(tbody.querySelector('.prev-directory')).toBeFalsy();
expect(tbody.querySelector('.loading-file')).toBeFalsy();
expect(tbody.querySelector('.file')).toBeTruthy();
});
......@@ -48,4 +48,14 @@ describe('RepoSidebar', () => {
expect(vm.$el.querySelectorAll('tbody .loading-file').length).toEqual(5);
});
it('renders a prev directory if isRoot', () => {
RepoStore.files = [{
id: 0,
}];
RepoStore.isRoot = true;
const vm = createComponent();
expect(vm.$el.querySelector('tbody .prev-directory')).toBeTruthy();
});
});
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment