Commit ced971b1 authored by Simon Knox's avatar Simon Knox

code style and test fixes

fix test following https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/9172
parent cea0996a
......@@ -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');
......
......@@ -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');
});
});
......
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