summaryrefslogtreecommitdiff
path: root/spec/javascripts
diff options
context:
space:
mode:
authorSimon Knox <psimyn@gmail.com>2017-02-14 13:52:20 +1100
committerSimon Knox <psimyn@gmail.com>2017-02-14 13:52:20 +1100
commitced971b12a1f6e01bb443b81c90e8691d8cc69b4 (patch)
treefddb9c125d8c1eeed416bd854ebcb30281415e0f /spec/javascripts
parentcea0996ab126f2e8827801cf545691eb7eb6c756 (diff)
downloadgitlab-ce-ced971b12a1f6e01bb443b81c90e8691d8cc69b4.tar.gz
code style and test fixes
fix test following https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/9172
Diffstat (limited to 'spec/javascripts')
-rw-r--r--spec/javascripts/merge_request_spec.js6
-rw-r--r--spec/javascripts/notes_spec.js2
2 files changed, 4 insertions, 4 deletions
diff --git a/spec/javascripts/merge_request_spec.js b/spec/javascripts/merge_request_spec.js
index 25cfa9e9479..34c98f5176a 100644
--- a/spec/javascripts/merge_request_spec.js
+++ b/spec/javascripts/merge_request_spec.js
@@ -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');
diff --git a/spec/javascripts/notes_spec.js b/spec/javascripts/notes_spec.js
index ac3d285572a..b5b4f61e5d5 100644
--- a/spec/javascripts/notes_spec.js
+++ b/spec/javascripts/notes_spec.js
@@ -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');
});
});