code style and test fixes

fix test following https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/9172
This commit is contained in:
Simon Knox 2017-02-14 13:52:20 +11:00
parent cea0996ab1
commit ced971b12a
3 changed files with 4 additions and 4 deletions

View file

@ -6,9 +6,9 @@ require('~/merge_request');
(function() {
describe('MergeRequest', function() {
return describe('task lists', function() {
preloadFixtures('static/merge_requests_show.html.raw');
preloadFixtures('merge_requests/merge_request_with_task_list.html.raw');
beforeEach(function() {
loadFixtures('static/merge_requests_show.html.raw');
loadFixtures('merge_requests/merge_request_with_task_list.html.raw');
return this.merge = new MergeRequest();
});
it('modifies the Markdown field', function() {
@ -19,7 +19,7 @@ require('~/merge_request');
return it('submits an ajax request on tasklist:changed', function() {
spyOn(jQuery, 'ajax').and.callFake(function(req) {
expect(req.type).toBe('PATCH');
expect(req.url).toBe('/foo');
expect(req.url).toBe(`${gl.TEST_HOST}/frontend-fixtures/merge-requests-project/merge_requests/1.json`);
return expect(req.data.merge_request.description).not.toBe(null);
});
return $('.js-task-list-field').trigger('tasklist:changed');

View file

@ -41,7 +41,7 @@ require('~/lib/utils/text_utility');
expect(req.url).toBe('http://test.host/frontend-fixtures/issues-project/notes/1');
return expect(req.data.note).not.toBe(null);
});
return $('.js-task-list-field').trigger('tasklist:changed');
$('.js-task-list-field').trigger('tasklist:changed');
});
});