Commit 4ed1cec5 authored by Romain Courteaud's avatar Romain Courteaud

Do not redefine existing variable

parent e1d86e21
...@@ -70,12 +70,12 @@ ...@@ -70,12 +70,12 @@
expect(2); expect(2);
stop(); stop();
var test = this; var that = this;
this.jio.put("put1", {"title": "myPut1"}) this.jio.put("put1", {"title": "myPut1"})
.then(function (uuid) { .then(function (uuid) {
equal(uuid, "put1"); equal(uuid, "put1");
deepEqual(test.jio.__storage._database.put1, { deepEqual(that.jio.__storage._database.put1, {
attachments: {}, attachments: {},
doc: "{\"title\":\"myPut1\"}" doc: "{\"title\":\"myPut1\"}"
}); });
...@@ -90,7 +90,7 @@ ...@@ -90,7 +90,7 @@
test("put when document already exists", function () { test("put when document already exists", function () {
var id = "put1", var id = "put1",
test = this; that = this;
this.jio.__storage._database[id] = { this.jio.__storage._database[id] = {
"foo": "bar", "foo": "bar",
"attachments": {"foo": "bar"}, "attachments": {"foo": "bar"},
...@@ -102,7 +102,7 @@ ...@@ -102,7 +102,7 @@
this.jio.put(id, {"title": "myPut2"}) this.jio.put(id, {"title": "myPut2"})
.then(function (uuid) { .then(function (uuid) {
equal(uuid, "put1"); equal(uuid, "put1");
deepEqual(test.jio.__storage._database.put1, { deepEqual(that.jio.__storage._database.put1, {
"foo": "bar", "foo": "bar",
"attachments": {"foo": "bar"}, "attachments": {"foo": "bar"},
doc: "{\"title\":\"myPut2\"}" doc: "{\"title\":\"myPut2\"}"
......
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