fix header workaround for mocking requests

This commit is contained in:
Matias Alejo Garcia 2016-07-28 16:49:18 -03:00
commit 1f57a02746
No known key found for this signature in database
GPG key ID: 02470DB551277AB3

View file

@ -112,7 +112,7 @@ mocks.init = function(fixtures, controllerName, opts, done) {
var headers = JSON.stringify(bwc._getHeaders(method, url, args));
// Fixes BWC version... TODO
headers = headers.replace(/bwc-\d\.\d\.\d/, 'bwc-2.4.0')
headers = headers.replace(/bwc-\d+\.\d+\.\d+/, 'bwc-2.4.0')
var x = method + url + JSON.stringify(args) + headers;
var sjcl = $delegate.getSJCL();
return sjcl.codec.hex.fromBits(sjcl.hash.sha256.hash(x));