diff options
author | Johann Hubert Sonntagbauer <johann.sonntagbauer@gmail.com> | 2018-10-09 21:03:09 +0300 |
---|---|---|
committer | Johann Hubert Sonntagbauer <johann.sonntagbauer@gmail.com> | 2018-10-17 07:57:29 +0300 |
commit | 6f5723a169b5d400c136dbd844fc54c68e5f8563 (patch) | |
tree | e7bad2648366ed5943293655a0abe23367e869a6 /spec/javascripts/pager_spec.js | |
parent | 28d412e5b2b8499fba22e8fabb1d44f44449228e (diff) |
enable jasmine/new-line-before-expect
Diffstat (limited to 'spec/javascripts/pager_spec.js')
-rw-r--r-- | spec/javascripts/pager_spec.js | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/spec/javascripts/pager_spec.js b/spec/javascripts/pager_spec.js index 04f2e7ef4f9..93efc139254 100644 --- a/spec/javascripts/pager_spec.js +++ b/spec/javascripts/pager_spec.js @@ -30,6 +30,7 @@ describe('pager', () => { const href = `${gl.TEST_HOST}/some_list.json`; setFixtures(`<div class="content_list" data-href="${href}"></div>`); Pager.init(); + expect(Pager.url).toBe(href); }); @@ -37,12 +38,14 @@ describe('pager', () => { const href = `${gl.TEST_HOST}/some_list`; spyOnDependency(Pager, 'removeParams').and.returnValue(href); Pager.init(); + expect(Pager.url).toBe(href); }); it('should get initial offset from query parameter', () => { window.history.replaceState({}, null, '?offset=100'); Pager.init(); + expect(Pager.offset).toBe(100); }); @@ -51,6 +54,7 @@ describe('pager', () => { const href = `${gl.TEST_HOST}/some_list?filter=test`; const removeParams = spyOnDependency(Pager, 'removeParams').and.returnValue(href); Pager.init(); + expect(removeParams).toHaveBeenCalledWith(['limit', 'offset']); expect(Pager.url).toEqual(href); }); @@ -132,6 +136,7 @@ describe('pager', () => { offset: 100, }, }); + expect(url).toBe('/some_list'); done(); |