diff options
| author | Douwe Maan <douwe@selenight.nl> | 2017-01-25 11:23:25 -0600 |
|---|---|---|
| committer | Douwe Maan <douwe@selenight.nl> | 2017-01-25 11:23:25 -0600 |
| commit | 21755ac9e9e349c4291e6f64109abe0b4588436d (patch) | |
| tree | e8123e81ef63ebd7d9936042d6bd3a66e6a8760d /spec/javascripts/lib/utils/common_utils_spec.js.es6 | |
| parent | 43dc6263526dbbb7dab44d91406c36b07ce2829b (diff) | |
| parent | b55c1bc4b5fb8d259ba9f264eff607f81012fa39 (diff) | |
| download | gitlab-ce-21755ac9e9e349c4291e6f64109abe0b4588436d.tar.gz | |
Merge branch 'master' into copy-as-md
# Conflicts:
# app/assets/javascripts/lib/utils/common_utils.js.es6
Diffstat (limited to 'spec/javascripts/lib/utils/common_utils_spec.js.es6')
| -rw-r--r-- | spec/javascripts/lib/utils/common_utils_spec.js.es6 | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/spec/javascripts/lib/utils/common_utils_spec.js.es6 b/spec/javascripts/lib/utils/common_utils_spec.js.es6 index 031f9ca03c9..1ce8f28e568 100644 --- a/spec/javascripts/lib/utils/common_utils_spec.js.es6 +++ b/spec/javascripts/lib/utils/common_utils_spec.js.es6 @@ -52,5 +52,22 @@ expect(value).toBe(null); }); }); + + describe('gl.utils.normalizedHeaders', () => { + it('should upperCase all the header keys to keep them consistent', () => { + const apiHeaders = { + 'X-Something-Workhorse': { workhorse: 'ok' }, + 'x-something-nginx': { nginx: 'ok' }, + }; + + const normalized = gl.utils.normalizeHeaders(apiHeaders); + + const WORKHORSE = 'X-SOMETHING-WORKHORSE'; + const NGINX = 'X-SOMETHING-NGINX'; + + expect(normalized[WORKHORSE].workhorse).toBe('ok'); + expect(normalized[NGINX].nginx).toBe('ok'); + }); + }); }); })(); |
