Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
J
jio
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Romain Courteaud
jio
Commits
21458ee6
Commit
21458ee6
authored
Aug 20, 2018
by
Romain Courteaud
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Officejs: do not redefine existing variable
parent
4ed1cec5
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
78 additions
and
78 deletions
+78
-78
examples/scenario_officejs.js
examples/scenario_officejs.js
+78
-78
No files found.
examples/scenario_officejs.js
View file @
21458ee6
...
@@ -79,13 +79,13 @@
...
@@ -79,13 +79,13 @@
function
equalStorage
(
storage
,
doc_tuple_list
)
{
function
equalStorage
(
storage
,
doc_tuple_list
)
{
return
storage
.
allDocs
()
return
storage
.
allDocs
()
.
push
(
function
(
result
)
{
.
push
(
function
(
result
)
{
var
i
,
var
j
,
promise_list
=
[];
promise_list
=
[];
for
(
i
=
0
;
i
<
result
.
data
.
rows
.
length
;
i
+=
1
)
{
for
(
j
=
0
;
j
<
result
.
data
.
rows
.
length
;
j
+=
1
)
{
promise_list
.
push
(
RSVP
.
all
([
promise_list
.
push
(
RSVP
.
all
([
result
.
data
.
rows
[
i
].
id
,
result
.
data
.
rows
[
j
].
id
,
storage
.
get
(
result
.
data
.
rows
[
i
].
id
),
storage
.
get
(
result
.
data
.
rows
[
j
].
id
),
storage
.
getAttachment
(
result
.
data
.
rows
[
i
].
id
,
ATTACHMENT
)
storage
.
getAttachment
(
result
.
data
.
rows
[
j
].
id
,
ATTACHMENT
)
]));
]));
}
}
return
RSVP
.
all
(
promise_list
);
return
RSVP
.
all
(
promise_list
);
...
@@ -182,14 +182,14 @@
...
@@ -182,14 +182,14 @@
expect
(
2
);
expect
(
2
);
stop
();
stop
();
var
t
es
t
=
this
;
var
t
ha
t
=
this
;
this
.
jio
.
repair
()
this
.
jio
.
repair
()
.
then
(
function
()
{
.
then
(
function
()
{
return
RSVP
.
all
([
return
RSVP
.
all
([
isEmptyStorage
(
t
es
t
.
jio
),
isEmptyStorage
(
t
ha
t
.
jio
),
equalRemoteStorageCallCount
(
equalRemoteStorageCallCount
(
t
es
t
.
remote_mock_options
.
count
,
t
ha
t
.
remote_mock_options
.
count
,
{
buildQuery
:
1
}
{
buildQuery
:
1
}
)
)
]);
]);
...
@@ -206,24 +206,24 @@
...
@@ -206,24 +206,24 @@
expect
(
2
);
expect
(
2
);
stop
();
stop
();
var
t
es
t
=
this
,
var
t
ha
t
=
this
,
doc_id
=
'
foo_module/1
'
,
doc_id
=
'
foo_module/1
'
,
doc
=
{
title
:
doc_id
,
portal_type
:
"
Foo
"
,
modification_date
:
'
a
'
},
doc
=
{
title
:
doc_id
,
portal_type
:
"
Foo
"
,
modification_date
:
'
a
'
},
blob
=
new
Blob
([
'
a
'
]);
blob
=
new
Blob
([
'
a
'
]);
putFullDoc
(
this
.
jio
.
__storage
.
_remote_sub_storage
,
doc_id
,
doc
,
blob
)
putFullDoc
(
this
.
jio
.
__storage
.
_remote_sub_storage
,
doc_id
,
doc
,
blob
)
.
then
(
function
()
{
.
then
(
function
()
{
return
t
es
t
.
jio
.
repair
();
return
t
ha
t
.
jio
.
repair
();
})
})
.
then
(
function
()
{
.
then
(
function
()
{
resetCount
(
test
.
remote_mock_options
.
count
);
resetCount
(
test
.
remote_mock_options
.
count
);
return
t
es
t
.
jio
.
repair
();
return
t
ha
t
.
jio
.
repair
();
})
})
.
then
(
function
()
{
.
then
(
function
()
{
return
RSVP
.
all
([
return
RSVP
.
all
([
equalStorage
(
t
es
t
.
jio
,
[[
doc_id
,
doc
,
blob
]]),
equalStorage
(
t
ha
t
.
jio
,
[[
doc_id
,
doc
,
blob
]]),
equalRemoteStorageCallCount
(
equalRemoteStorageCallCount
(
t
es
t
.
remote_mock_options
.
count
,
t
ha
t
.
remote_mock_options
.
count
,
{
buildQuery
:
1
}
{
buildQuery
:
1
}
)
)
]);
]);
...
@@ -243,21 +243,21 @@
...
@@ -243,21 +243,21 @@
expect
(
2
);
expect
(
2
);
stop
();
stop
();
var
t
es
t
=
this
,
var
t
ha
t
=
this
,
doc_id
=
'
foo_module/1
'
,
doc_id
=
'
foo_module/1
'
,
doc
=
{
title
:
doc_id
,
portal_type
:
"
Foo
"
,
modification_date
:
'
a
'
},
doc
=
{
title
:
doc_id
,
portal_type
:
"
Foo
"
,
modification_date
:
'
a
'
},
blob
=
new
Blob
([
'
a
'
]);
blob
=
new
Blob
([
'
a
'
]);
putFullDoc
(
this
.
jio
.
__storage
.
_remote_sub_storage
,
doc_id
,
doc
,
blob
)
putFullDoc
(
this
.
jio
.
__storage
.
_remote_sub_storage
,
doc_id
,
doc
,
blob
)
.
then
(
function
()
{
.
then
(
function
()
{
resetCount
(
t
es
t
.
remote_mock_options
.
count
);
resetCount
(
t
ha
t
.
remote_mock_options
.
count
);
return
t
es
t
.
jio
.
repair
();
return
t
ha
t
.
jio
.
repair
();
})
})
.
then
(
function
()
{
.
then
(
function
()
{
return
RSVP
.
all
([
return
RSVP
.
all
([
equalStorage
(
t
es
t
.
jio
,
[[
doc_id
,
doc
,
blob
]]),
equalStorage
(
t
ha
t
.
jio
,
[[
doc_id
,
doc
,
blob
]]),
equalRemoteStorageCallCount
(
equalRemoteStorageCallCount
(
t
es
t
.
remote_mock_options
.
count
,
t
ha
t
.
remote_mock_options
.
count
,
{
buildQuery
:
1
,
get
:
1
,
getAttachment
:
1
,
allAttachments
:
1
}
{
buildQuery
:
1
,
get
:
1
,
getAttachment
:
1
,
allAttachments
:
1
}
)
)
]);
]);
...
@@ -277,7 +277,7 @@
...
@@ -277,7 +277,7 @@
expect
(
2
);
expect
(
2
);
stop
();
stop
();
var
t
es
t
=
this
,
var
t
ha
t
=
this
,
doc_id
=
'
foo_module/1
'
,
doc_id
=
'
foo_module/1
'
,
doc
=
{
title
:
doc_id
,
portal_type
:
"
Foo
"
,
modification_date
:
'
a
'
},
doc
=
{
title
:
doc_id
,
portal_type
:
"
Foo
"
,
modification_date
:
'
a
'
},
doc2
=
{
title
:
doc_id
+
'
a
'
,
portal_type
:
"
Foo
"
,
modification_date
:
'
b
'
},
doc2
=
{
title
:
doc_id
+
'
a
'
,
portal_type
:
"
Foo
"
,
modification_date
:
'
b
'
},
...
@@ -286,10 +286,10 @@
...
@@ -286,10 +286,10 @@
putFullDoc
(
this
.
jio
.
__storage
.
_remote_sub_storage
,
doc_id
,
doc
,
blob
)
putFullDoc
(
this
.
jio
.
__storage
.
_remote_sub_storage
,
doc_id
,
doc
,
blob
)
.
then
(
function
()
{
.
then
(
function
()
{
return
t
es
t
.
jio
.
repair
();
return
t
ha
t
.
jio
.
repair
();
})
})
.
then
(
function
()
{
.
then
(
function
()
{
return
putFullDoc
(
t
es
t
.
jio
.
__storage
.
_remote_sub_storage
,
doc_id
,
doc2
,
return
putFullDoc
(
t
ha
t
.
jio
.
__storage
.
_remote_sub_storage
,
doc_id
,
doc2
,
blob2
);
blob2
);
})
})
.
then
(
function
()
{
.
then
(
function
()
{
...
@@ -320,27 +320,27 @@
...
@@ -320,27 +320,27 @@
expect
(
2
);
expect
(
2
);
stop
();
stop
();
var
t
es
t
=
this
,
var
t
ha
t
=
this
,
doc_id
=
'
foo_module/1
'
,
doc_id
=
'
foo_module/1
'
,
doc
=
{
title
:
doc_id
,
portal_type
:
"
Foo
"
,
modification_date
:
'
a
'
},
doc
=
{
title
:
doc_id
,
portal_type
:
"
Foo
"
,
modification_date
:
'
a
'
},
blob
=
new
Blob
([
'
a
'
]);
blob
=
new
Blob
([
'
a
'
]);
putFullDoc
(
this
.
jio
.
__storage
.
_remote_sub_storage
,
doc_id
,
doc
,
blob
)
putFullDoc
(
this
.
jio
.
__storage
.
_remote_sub_storage
,
doc_id
,
doc
,
blob
)
.
then
(
function
()
{
.
then
(
function
()
{
return
t
es
t
.
jio
.
repair
();
return
t
ha
t
.
jio
.
repair
();
})
})
.
then
(
function
()
{
.
then
(
function
()
{
t
es
t
.
remote_mock_options
.
mock
.
buildQuery
=
function
()
{
t
ha
t
.
remote_mock_options
.
mock
.
buildQuery
=
function
()
{
return
[];
return
[];
};
};
resetCount
(
t
es
t
.
remote_mock_options
.
count
);
resetCount
(
t
ha
t
.
remote_mock_options
.
count
);
return
t
es
t
.
jio
.
repair
();
return
t
ha
t
.
jio
.
repair
();
})
})
.
then
(
function
()
{
.
then
(
function
()
{
return
RSVP
.
all
([
return
RSVP
.
all
([
isEmptyStorage
(
t
es
t
.
jio
),
isEmptyStorage
(
t
ha
t
.
jio
),
equalRemoteStorageCallCount
(
equalRemoteStorageCallCount
(
t
es
t
.
remote_mock_options
.
count
,
t
ha
t
.
remote_mock_options
.
count
,
{
buildQuery
:
1
}
{
buildQuery
:
1
}
)
)
]);
]);
...
@@ -360,24 +360,24 @@
...
@@ -360,24 +360,24 @@
expect
(
3
);
expect
(
3
);
stop
();
stop
();
var
t
es
t
=
this
,
var
t
ha
t
=
this
,
doc_id
=
'
abc
'
,
doc_id
=
'
abc
'
,
doc
=
{
title
:
doc_id
,
portal_type
:
"
Foo
"
,
modification_date
:
'
a
'
},
doc
=
{
title
:
doc_id
,
portal_type
:
"
Foo
"
,
modification_date
:
'
a
'
},
blob
=
new
Blob
([
'
a
'
]);
blob
=
new
Blob
([
'
a
'
]);
putFullDoc
(
this
.
jio
,
doc_id
,
doc
,
blob
)
putFullDoc
(
this
.
jio
,
doc_id
,
doc
,
blob
)
.
then
(
function
()
{
.
then
(
function
()
{
resetCount
(
t
es
t
.
remote_mock_options
.
count
);
resetCount
(
t
ha
t
.
remote_mock_options
.
count
);
return
t
es
t
.
jio
.
repair
();
return
t
ha
t
.
jio
.
repair
();
})
})
.
then
(
function
()
{
.
then
(
function
()
{
return
RSVP
.
all
([
return
RSVP
.
all
([
equalStorage
(
equalStorage
(
t
es
t
.
jio
,
t
ha
t
.
jio
,
[[
t
es
t
.
remote_mock_options
.
last_post_id
,
doc
,
blob
]]
[[
t
ha
t
.
remote_mock_options
.
last_post_id
,
doc
,
blob
]]
),
),
equalRemoteStorageCallCount
(
equalRemoteStorageCallCount
(
t
es
t
.
remote_mock_options
.
count
,
t
ha
t
.
remote_mock_options
.
count
,
{
buildQuery
:
1
,
post
:
1
,
putAttachment
:
1
,
allAttachments
:
1
}
{
buildQuery
:
1
,
post
:
1
,
putAttachment
:
1
,
allAttachments
:
1
}
)
)
]);
]);
...
@@ -403,7 +403,7 @@
...
@@ -403,7 +403,7 @@
expect
(
2
);
expect
(
2
);
stop
();
stop
();
var
t
es
t
=
this
,
var
t
ha
t
=
this
,
doc_id
=
'
foo_module/1
'
,
doc_id
=
'
foo_module/1
'
,
doc
=
{
title
:
doc_id
,
portal_type
:
"
Foo
"
,
modification_date
:
'
a
'
},
doc
=
{
title
:
doc_id
,
portal_type
:
"
Foo
"
,
modification_date
:
'
a
'
},
doc2
=
{
title
:
doc_id
+
'
a
'
,
portal_type
:
"
Foo
"
,
modification_date
:
'
b
'
},
doc2
=
{
title
:
doc_id
+
'
a
'
,
portal_type
:
"
Foo
"
,
modification_date
:
'
b
'
},
...
@@ -413,24 +413,24 @@
...
@@ -413,24 +413,24 @@
putFullDoc
(
this
.
jio
,
doc_id
,
doc
,
blob
)
putFullDoc
(
this
.
jio
,
doc_id
,
doc
,
blob
)
.
then
(
function
()
{
.
then
(
function
()
{
return
t
es
t
.
jio
.
repair
();
return
t
ha
t
.
jio
.
repair
();
})
})
.
then
(
function
()
{
.
then
(
function
()
{
last_id
=
t
es
t
.
remote_mock_options
.
last_post_id
;
last_id
=
t
ha
t
.
remote_mock_options
.
last_post_id
;
return
putFullDoc
(
t
es
t
.
jio
,
last_id
,
doc2
,
blob2
);
return
putFullDoc
(
t
ha
t
.
jio
,
last_id
,
doc2
,
blob2
);
})
})
.
then
(
function
()
{
.
then
(
function
()
{
resetCount
(
t
es
t
.
remote_mock_options
.
count
);
resetCount
(
t
ha
t
.
remote_mock_options
.
count
);
return
t
es
t
.
jio
.
repair
();
return
t
ha
t
.
jio
.
repair
();
})
})
.
then
(
function
()
{
.
then
(
function
()
{
return
RSVP
.
all
([
return
RSVP
.
all
([
equalStorage
(
equalStorage
(
t
es
t
.
jio
.
__storage
.
_remote_sub_storage
,
t
ha
t
.
jio
.
__storage
.
_remote_sub_storage
,
[[
last_id
,
doc2
,
blob2
]]
[[
last_id
,
doc2
,
blob2
]]
),
),
equalRemoteStorageCallCount
(
equalRemoteStorageCallCount
(
t
es
t
.
remote_mock_options
.
count
,
t
ha
t
.
remote_mock_options
.
count
,
{
buildQuery
:
1
,
put
:
1
,
{
buildQuery
:
1
,
put
:
1
,
allAttachments
:
1
,
putAttachment
:
1
}
allAttachments
:
1
,
putAttachment
:
1
}
)
)
...
@@ -451,7 +451,7 @@
...
@@ -451,7 +451,7 @@
expect
(
2
);
expect
(
2
);
stop
();
stop
();
var
t
es
t
=
this
,
var
t
ha
t
=
this
,
doc_id
=
'
foo_module/1
'
,
doc_id
=
'
foo_module/1
'
,
doc
=
{
title
:
doc_id
,
portal_type
:
"
Foo
"
,
modification_date
:
'
a
'
},
doc
=
{
title
:
doc_id
,
portal_type
:
"
Foo
"
,
modification_date
:
'
a
'
},
doc2
=
{
title
:
doc_id
+
'
a
'
,
portal_type
:
"
Foo
"
,
modification_date
:
'
b
'
},
doc2
=
{
title
:
doc_id
+
'
a
'
,
portal_type
:
"
Foo
"
,
modification_date
:
'
b
'
},
...
@@ -462,27 +462,27 @@
...
@@ -462,27 +462,27 @@
putFullDoc
(
this
.
jio
.
__storage
.
_remote_sub_storage
,
doc_id
,
doc
,
blob
)
putFullDoc
(
this
.
jio
.
__storage
.
_remote_sub_storage
,
doc_id
,
doc
,
blob
)
.
then
(
function
()
{
.
then
(
function
()
{
return
t
es
t
.
jio
.
repair
();
return
t
ha
t
.
jio
.
repair
();
})
})
.
then
(
function
()
{
.
then
(
function
()
{
return
RSVP
.
all
([
return
RSVP
.
all
([
putFullDoc
(
t
es
t
.
jio
.
__storage
.
_remote_sub_storage
,
doc_id
,
putFullDoc
(
t
ha
t
.
jio
.
__storage
.
_remote_sub_storage
,
doc_id
,
doc2
,
blob2
),
doc2
,
blob2
),
putFullDoc
(
t
es
t
.
jio
,
doc_id
,
doc3
,
blob3
)
putFullDoc
(
t
ha
t
.
jio
,
doc_id
,
doc3
,
blob3
)
]);
]);
})
})
.
then
(
function
()
{
.
then
(
function
()
{
resetCount
(
t
es
t
.
remote_mock_options
.
count
);
resetCount
(
t
ha
t
.
remote_mock_options
.
count
);
return
t
es
t
.
jio
.
repair
();
return
t
ha
t
.
jio
.
repair
();
})
})
.
then
(
function
()
{
.
then
(
function
()
{
return
RSVP
.
all
([
return
RSVP
.
all
([
equalStorage
(
equalStorage
(
t
es
t
.
jio
.
__storage
.
_remote_sub_storage
,
t
ha
t
.
jio
.
__storage
.
_remote_sub_storage
,
[[
doc_id
,
doc3
,
blob3
]]
[[
doc_id
,
doc3
,
blob3
]]
),
),
equalRemoteStorageCallCount
(
equalRemoteStorageCallCount
(
t
es
t
.
remote_mock_options
.
count
,
t
ha
t
.
remote_mock_options
.
count
,
{
buildQuery
:
1
,
put
:
1
,
{
buildQuery
:
1
,
put
:
1
,
allAttachments
:
1
,
putAttachment
:
1
}
allAttachments
:
1
,
putAttachment
:
1
}
)
)
...
@@ -500,7 +500,7 @@
...
@@ -500,7 +500,7 @@
expect
(
2
);
expect
(
2
);
stop
();
stop
();
var
t
es
t
=
this
,
var
t
ha
t
=
this
,
doc_id
=
'
foo_module/1
'
,
doc_id
=
'
foo_module/1
'
,
doc
=
{
title
:
doc_id
,
portal_type
:
"
Foo
"
,
modification_date
:
'
a
'
},
doc
=
{
title
:
doc_id
,
portal_type
:
"
Foo
"
,
modification_date
:
'
a
'
},
doc2
=
{
title
:
doc_id
+
'
a
'
,
portal_type
:
"
Foo
"
,
modification_date
:
'
b
'
},
doc2
=
{
title
:
doc_id
+
'
a
'
,
portal_type
:
"
Foo
"
,
modification_date
:
'
b
'
},
...
@@ -509,19 +509,19 @@
...
@@ -509,19 +509,19 @@
putFullDoc
(
this
.
jio
.
__storage
.
_remote_sub_storage
,
doc_id
,
doc
,
blob
)
putFullDoc
(
this
.
jio
.
__storage
.
_remote_sub_storage
,
doc_id
,
doc
,
blob
)
.
then
(
function
()
{
.
then
(
function
()
{
return
t
es
t
.
jio
.
repair
();
return
t
ha
t
.
jio
.
repair
();
})
})
.
then
(
function
()
{
.
then
(
function
()
{
return
putFullDoc
(
t
es
t
.
jio
,
doc_id
,
doc2
,
blob2
);
return
putFullDoc
(
t
ha
t
.
jio
,
doc_id
,
doc2
,
blob2
);
})
})
.
then
(
function
()
{
.
then
(
function
()
{
t
es
t
.
remote_mock_options
.
mock
.
put
=
function
()
{
t
ha
t
.
remote_mock_options
.
mock
.
put
=
function
()
{
throw
new
Error
(
'
put not allowed
'
);
throw
new
Error
(
'
put not allowed
'
);
};
};
t
es
t
.
remote_mock_options
.
mock
.
putAttachment
=
function
()
{
t
ha
t
.
remote_mock_options
.
mock
.
putAttachment
=
function
()
{
throw
new
Error
(
'
putattachment not allowed
'
);
throw
new
Error
(
'
putattachment not allowed
'
);
};
};
resetCount
(
t
es
t
.
remote_mock_options
.
count
);
resetCount
(
t
ha
t
.
remote_mock_options
.
count
);
return
test
.
jio
.
repair
();
return
test
.
jio
.
repair
();
})
})
.
then
(
function
()
{
.
then
(
function
()
{
...
@@ -542,31 +542,31 @@
...
@@ -542,31 +542,31 @@
expect
(
3
);
expect
(
3
);
stop
();
stop
();
var
t
es
t
=
this
,
var
t
ha
t
=
this
,
doc_id
=
'
foo_module/1
'
,
doc_id
=
'
foo_module/1
'
,
doc
=
{
title
:
doc_id
,
portal_type
:
"
Foo
"
,
modification_date
:
'
a
'
},
doc
=
{
title
:
doc_id
,
portal_type
:
"
Foo
"
,
modification_date
:
'
a
'
},
blob
=
new
Blob
([
'
a
'
]);
blob
=
new
Blob
([
'
a
'
]);
putFullDoc
(
this
.
jio
.
__storage
.
_remote_sub_storage
,
doc_id
,
doc
,
blob
)
putFullDoc
(
this
.
jio
.
__storage
.
_remote_sub_storage
,
doc_id
,
doc
,
blob
)
.
then
(
function
()
{
.
then
(
function
()
{
return
t
es
t
.
jio
.
repair
();
return
t
ha
t
.
jio
.
repair
();
})
})
.
then
(
function
()
{
.
then
(
function
()
{
return
t
es
t
.
jio
.
remove
(
doc_id
);
return
t
ha
t
.
jio
.
remove
(
doc_id
);
})
})
.
then
(
function
()
{
.
then
(
function
()
{
resetCount
(
test
.
remote_mock_options
.
count
);
resetCount
(
test
.
remote_mock_options
.
count
);
return
t
es
t
.
jio
.
repair
();
return
t
ha
t
.
jio
.
repair
();
})
})
.
then
(
function
()
{
.
then
(
function
()
{
return
RSVP
.
all
([
return
RSVP
.
all
([
isEmptyStorage
(
t
es
t
.
jio
),
isEmptyStorage
(
t
ha
t
.
jio
),
equalStorage
(
equalStorage
(
t
es
t
.
jio
.
__storage
.
_remote_sub_storage
,
t
ha
t
.
jio
.
__storage
.
_remote_sub_storage
,
[[
doc_id
,
doc
,
blob
]]
[[
doc_id
,
doc
,
blob
]]
),
),
equalRemoteStorageCallCount
(
equalRemoteStorageCallCount
(
t
es
t
.
remote_mock_options
.
count
,
t
ha
t
.
remote_mock_options
.
count
,
{
buildQuery
:
1
}
{
buildQuery
:
1
}
)
)
]);
]);
...
@@ -583,30 +583,30 @@
...
@@ -583,30 +583,30 @@
expect
(
2
);
expect
(
2
);
stop
();
stop
();
var
t
es
t
=
this
,
var
t
ha
t
=
this
,
doc_id
=
'
foo_module/1
'
,
doc_id
=
'
foo_module/1
'
,
doc
=
{
title
:
doc_id
,
portal_type
:
"
Foo
"
,
modification_date
:
'
a
'
},
doc
=
{
title
:
doc_id
,
portal_type
:
"
Foo
"
,
modification_date
:
'
a
'
},
blob
=
new
Blob
([
'
a
'
]);
blob
=
new
Blob
([
'
a
'
]);
putFullDoc
(
this
.
jio
.
__storage
.
_remote_sub_storage
,
doc_id
,
doc
,
blob
)
putFullDoc
(
this
.
jio
.
__storage
.
_remote_sub_storage
,
doc_id
,
doc
,
blob
)
.
then
(
function
()
{
.
then
(
function
()
{
return
t
es
t
.
jio
.
repair
();
return
t
ha
t
.
jio
.
repair
();
})
})
.
then
(
function
()
{
.
then
(
function
()
{
return
t
es
t
.
jio
.
removeAttachment
(
doc_id
,
ATTACHMENT
);
return
t
ha
t
.
jio
.
removeAttachment
(
doc_id
,
ATTACHMENT
);
})
})
.
then
(
function
()
{
.
then
(
function
()
{
resetCount
(
test
.
remote_mock_options
.
count
);
resetCount
(
test
.
remote_mock_options
.
count
);
return
t
es
t
.
jio
.
repair
();
return
t
ha
t
.
jio
.
repair
();
})
})
.
then
(
function
()
{
.
then
(
function
()
{
return
RSVP
.
all
([
return
RSVP
.
all
([
equalStorage
(
equalStorage
(
t
es
t
.
jio
.
__storage
.
_remote_sub_storage
,
t
ha
t
.
jio
.
__storage
.
_remote_sub_storage
,
[[
doc_id
,
doc
,
blob
]]
[[
doc_id
,
doc
,
blob
]]
),
),
equalRemoteStorageCallCount
(
equalRemoteStorageCallCount
(
t
es
t
.
remote_mock_options
.
count
,
t
ha
t
.
remote_mock_options
.
count
,
{
buildQuery
:
1
}
{
buildQuery
:
1
}
)
)
]);
]);
...
@@ -623,7 +623,7 @@
...
@@ -623,7 +623,7 @@
expect
(
2
);
expect
(
2
);
stop
();
stop
();
var
t
es
t
=
this
,
var
t
ha
t
=
this
,
doc_id
=
'
foo_module/1
'
,
doc_id
=
'
foo_module/1
'
,
doc
=
{
title
:
doc_id
,
portal_type
:
"
Foo
"
,
modification_date
:
'
a
'
},
doc
=
{
title
:
doc_id
,
portal_type
:
"
Foo
"
,
modification_date
:
'
a
'
},
doc2
=
{
title
:
doc_id
+
'
a
'
,
portal_type
:
"
Foo
"
,
modification_date
:
'
b
'
},
doc2
=
{
title
:
doc_id
+
'
a
'
,
portal_type
:
"
Foo
"
,
modification_date
:
'
b
'
},
...
@@ -632,31 +632,31 @@
...
@@ -632,31 +632,31 @@
putFullDoc
(
this
.
jio
.
__storage
.
_remote_sub_storage
,
doc_id
,
doc
,
blob
)
putFullDoc
(
this
.
jio
.
__storage
.
_remote_sub_storage
,
doc_id
,
doc
,
blob
)
.
then
(
function
()
{
.
then
(
function
()
{
return
t
es
t
.
jio
.
repair
();
return
t
ha
t
.
jio
.
repair
();
})
})
.
then
(
function
()
{
.
then
(
function
()
{
return
RSVP
.
all
([
return
RSVP
.
all
([
putFullDoc
(
t
es
t
.
jio
.
__storage
.
_remote_sub_storage
,
doc_id
,
putFullDoc
(
t
ha
t
.
jio
.
__storage
.
_remote_sub_storage
,
doc_id
,
doc2
,
blob2
),
doc2
,
blob2
),
t
es
t
.
jio
.
remove
(
doc_id
)
t
ha
t
.
jio
.
remove
(
doc_id
)
]);
]);
})
})
.
then
(
function
()
{
.
then
(
function
()
{
resetCount
(
t
es
t
.
remote_mock_options
.
count
);
resetCount
(
t
ha
t
.
remote_mock_options
.
count
);
return
t
es
t
.
jio
.
repair
();
return
t
ha
t
.
jio
.
repair
();
})
})
.
then
(
function
()
{
.
then
(
function
()
{
return
RSVP
.
all
([
return
RSVP
.
all
([
equalStorage
(
equalStorage
(
t
es
t
.
jio
,
t
ha
t
.
jio
,
[[
doc_id
,
doc2
,
blob2
]]
[[
doc_id
,
doc2
,
blob2
]]
),
),
equalStorage
(
equalStorage
(
t
es
t
.
jio
.
__storage
.
_remote_sub_storage
,
t
ha
t
.
jio
.
__storage
.
_remote_sub_storage
,
[[
doc_id
,
doc2
,
blob2
]]
[[
doc_id
,
doc2
,
blob2
]]
),
),
equalRemoteStorageCallCount
(
equalRemoteStorageCallCount
(
t
es
t
.
remote_mock_options
.
count
,
t
ha
t
.
remote_mock_options
.
count
,
{
buildQuery
:
1
,
get
:
1
,
{
buildQuery
:
1
,
get
:
1
,
allAttachments
:
1
,
getAttachment
:
1
}
allAttachments
:
1
,
getAttachment
:
1
}
)
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment