Skip to content

Commit

Permalink
fix test and remove catch statement
Browse files Browse the repository at this point in the history
  • Loading branch information
Pierre Trollé committed Jun 23, 2017
1 parent a18cb3f commit b005e8e
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 8 deletions.
7 changes: 3 additions & 4 deletions client/src/components/JobList.vue
Original file line number Diff line number Diff line change
Expand Up @@ -91,8 +91,8 @@
this.trackEvent();
this.sendInterest(job);
},
},
trackEvent() {
Expand All @@ -118,8 +118,7 @@
},
};
return axios.post(`${process.env.API_URL}/api/interests`, body)
.catch(error => Promise.reject(error));
return axios.post(`${process.env.API_URL}/api/interests`, body);
},
},
Expand Down
7 changes: 3 additions & 4 deletions client/test/unit/specs/JobList.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -92,13 +92,12 @@ describe('JobList.vue', () => {

});

// skip en attente du fetchActivities
it.skip('on click on button job__apply-button', () => {
it('on click on button job__apply-button', () => Vue.nextTick().then(() => {

// given

authentication.isAuthenticated.returns(true);

axios.post.resolves(true);
sinon.stub(component.$ga, 'event');
component.$ga.event.returns(true);

Expand All @@ -117,7 +116,7 @@ describe('JobList.vue', () => {
// after
component.$ga.event.restore();

});
}));

});

Expand Down

0 comments on commit b005e8e

Please sign in to comment.