diff options
author | kushalpandya <kushal@gitlab.com> | 2017-09-04 18:41:55 +0300 |
---|---|---|
committer | kushalpandya <kushal@gitlab.com> | 2017-09-05 10:41:20 +0300 |
commit | c47e1c3975255774ebef69f5ce58b43ddda12065 (patch) | |
tree | c164ca995529fbb2919ded4afc3475ad7da5b49b /spec/javascripts | |
parent | 365adfa522414bcd4f578cee6bc244a1b97b7fff (diff) |
Make query param `simple` part of config
Diffstat (limited to 'spec/javascripts')
-rw-r--r-- | spec/javascripts/api_spec.js | 6 | ||||
-rw-r--r-- | spec/javascripts/project_title_spec.js | 3 |
2 files changed, 6 insertions, 3 deletions
diff --git a/spec/javascripts/api_spec.js b/spec/javascripts/api_spec.js index 8c68ceff914..2aa4fb1f6c6 100644 --- a/spec/javascripts/api_spec.js +++ b/spec/javascripts/api_spec.js @@ -101,12 +101,13 @@ describe('Api', () => { it('fetches projects with membership when logged in', (done) => { const query = 'dummy query'; const options = { unused: 'option' }; - const expectedUrl = `${dummyUrlRoot}/api/${dummyApiVersion}/projects.json?simple=true`; + const expectedUrl = `${dummyUrlRoot}/api/${dummyApiVersion}/projects.json`; window.gon.current_user_id = 1; const expectedData = Object.assign({ search: query, per_page: 20, membership: true, + simple: true, }, options); spyOn(jQuery, 'ajax').and.callFake((request) => { expect(request.url).toEqual(expectedUrl); @@ -124,10 +125,11 @@ describe('Api', () => { it('fetches projects without membership when not logged in', (done) => { const query = 'dummy query'; const options = { unused: 'option' }; - const expectedUrl = `${dummyUrlRoot}/api/${dummyApiVersion}/projects.json?simple=true`; + const expectedUrl = `${dummyUrlRoot}/api/${dummyApiVersion}/projects.json`; const expectedData = Object.assign({ search: query, per_page: 20, + simple: true, }, options); spyOn(jQuery, 'ajax').and.callFake((request) => { expect(request.url).toEqual(expectedUrl); diff --git a/spec/javascripts/project_title_spec.js b/spec/javascripts/project_title_spec.js index 3d36bb3e4d4..9ea8414ae40 100644 --- a/spec/javascripts/project_title_spec.js +++ b/spec/javascripts/project_title_spec.js @@ -41,12 +41,13 @@ describe('Project Title', () => { window.gon.current_user_id = 1; $('.js-projects-dropdown-toggle').click(); expect($menu).toHaveClass('open'); - expect(reqUrl).toBe(`/api/${dummyApiVersion}/projects.json?simple=true`); + expect(reqUrl).toBe(`/api/${dummyApiVersion}/projects.json`); expect(reqData).toEqual({ search: '', order_by: 'last_activity_at', per_page: 20, membership: true, + simple: true, }); $menu.find('.dropdown-menu-close-icon').click(); expect($menu).not.toHaveClass('open'); |