Commit eddcb757 authored by Tristan Cavelier's avatar Tristan Cavelier

searchableencryption tests live compatible

parent 791ec893
......@@ -6,7 +6,7 @@
/*jslint indent: 2, maxlen: 80, nomen: true */
/*global module, test, stop, start, ok, deepEqual, RSVP, jIO, test_util, sjcl,
define, Blob */
define, Blob, searchableencryptionstorage_spec */
(function (dependencies, module) {
"use strict";
......@@ -17,12 +17,21 @@
}(["rsvp", "jio", "qunit"], function (RSVP, jIO) {
"use strict";
var spec;
spec = {
"type": "searchableencryption",
"url": "http://fakeserver",
"password": "coincoin"
};
var spec, use_fake_server = true, jIOUtilAjaxWrapper;
if (typeof searchableencryptionstorage_spec === "object") {
use_fake_server = false;
spec = {
"type": "searchableencryption",
"url": searchableencryptionstorage_spec.url,
"password": searchableencryptionstorage_spec.password
};
} else {
spec = {
"type": "searchableencryption",
"url": "http://fakeserver",
"password": "coincoin"
};
}
function reverse(promise) {
return new RSVP.Promise(function (resolve, reject, notify) {
......@@ -32,7 +41,7 @@
});
}
jIO.util.ajax = (function () {
jIOUtilAjaxWrapper = (function () {
/*jslint regexp: true */
// TEST SERVER
var dataBase, baseURLRe = /^http:\/\/fakeserver(\/[^\/]+)?(\/[^\/]+)?$/;
......@@ -210,6 +219,10 @@
return ServerAjax;
}());
if (use_fake_server) {
jIO.util.ajax = jIOUtilAjaxWrapper;
}
module("Searchable Encryption Storage");
/**
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment