fix helper

This commit is contained in:
Matias Alejo Garcia 2016-06-01 16:13:11 -03:00
parent 06c80ceaae
commit e9525687b7
No known key found for this signature in database
GPG Key ID: 02470DB551277AB3
1 changed files with 3 additions and 0 deletions

View File

@ -103,6 +103,9 @@ mocks.init = function(fixtures, controllerName, opts, done) {
function createHash(method, url, args) {
var headers = JSON.stringify(bwc._getHeaders(method, url, args));
// Fixes BWC version... TODO
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));