rewrite test which relied on teaspoon quirk

This commit is contained in:
Mike Greiling 2017-01-13 12:51:19 -05:00
parent 2ee2daa4b9
commit 6ad01a49d4
1 changed files with 6 additions and 2 deletions

View File

@ -42,9 +42,13 @@ require('~/lib/utils/common_utils');
});
describe('gl.utils.getParameterByName', () => {
beforeEach(() => {
window.history.pushState({}, null, '?scope=all&p=2');
});
it('should return valid parameter', () => {
const value = gl.utils.getParameterByName('reporter');
expect(value).toBe('Console');
const value = gl.utils.getParameterByName('scope');
expect(value).toBe('all');
});
it('should return invalid parameter', () => {