fixed failing specs

fixed merge requests not loading
This commit is contained in:
Phil Hughes 2018-05-30 09:40:04 +01:00
parent 234076abcf
commit e6e9706e53
No known key found for this signature in database
GPG Key ID: 32245528C52E0F9F
2 changed files with 4 additions and 3 deletions

View File

@ -63,7 +63,7 @@ router.beforeEach((to, from, next) => {
.then(() => {
const fullProjectId = `${to.params.namespace}/${to.params.project}`;
const baseSplit = to.params[0].split('/-/');
const baseSplit = (to.params[0] && to.params[0].split('/-/')) || [''];
const branchId = baseSplit[0].slice(-1) === '/' ? baseSplit[0].slice(0, -1) : baseSplit[0];
if (branchId) {

View File

@ -46,10 +46,11 @@ describe('IDE pipelines list', () => {
});
afterEach(() => {
vm.$store.dispatch('pipelines/stopPipelinePolling');
vm.$store.dispatch('pipelines/clearEtagPoll');
vm.$destroy();
mock.restore();
vm.$store.dispatch('stopPipelinePolling');
vm.$store.dispatch('clearEtagPoll');
});
it('renders pipeline data', () => {