diff options
| author | Tulio Casagrande <tcasagra@thoughtworks.com> | 2017-02-20 14:37:37 -0300 | 
|---|---|---|
| committer | Tulio Casagrande <tcasagra@thoughtworks.com> | 2017-02-21 13:32:05 -0300 | 
| commit | fa21608801f8d2ef710d4c28abbb558883afeaf7 (patch) | |
| tree | 009db4bb064b077a231a1abe4de212bceb20928b /web-ui/test/unit/util.spec.js | |
| parent | bfd85dff6b086abae1c16014e318c89cba929b66 (diff) | |
[#907] Translate auth error message on login
with @anikarni
Diffstat (limited to 'web-ui/test/unit/util.spec.js')
| -rw-r--r-- | web-ui/test/unit/util.spec.js | 20 | 
1 files changed, 20 insertions, 0 deletions
| diff --git a/web-ui/test/unit/util.spec.js b/web-ui/test/unit/util.spec.js new file mode 100644 index 00000000..84decf6f --- /dev/null +++ b/web-ui/test/unit/util.spec.js @@ -0,0 +1,20 @@ +import expect from 'expect'; +import Util from 'src/util'; + +describe('Utils', () => { +  describe('.hasQueryParameter', () => { +    global.window = { +      location: { +        search: '?auth&lng=pt-BR' +      } +    }; + +    it('checks if param included in query parameters', () => { +      expect(Util.hasQueryParameter('auth')).toBe(true); +    }); + +    it('checks if param not included in query parameters', () => { +      expect(Util.hasQueryParameter('error')).toBe(false); +    }); +  }); +}); | 
