summaryrefslogtreecommitdiffstats
path: root/settings
diff options
context:
space:
mode:
authorLukas Reschke <lukas@owncloud.com>2014-12-08 15:34:17 +0100
committerLukas Reschke <lukas@owncloud.com>2014-12-08 15:34:17 +0100
commit5f43809ace0068cd577959e4a522292ec3a1c9bb (patch)
treedf2d1d4792e08d3153f6891de61d419ed573425c /settings
parent8b3e3890628fa00d50c94af1131cbe3cd63e4a12 (diff)
parenteac0131d5ab6f5cb5f98595731d2bd8a17fe9b36 (diff)
downloadnextcloud-server-5f43809ace0068cd577959e4a522292ec3a1c9bb.tar.gz
nextcloud-server-5f43809ace0068cd577959e4a522292ec3a1c9bb.zip
Merge branch 'initial-work-migrate-to-appframework' of https://github.com/owncloud/core into initial-work-migrate-to-appframework
Diffstat (limited to 'settings')
-rw-r--r--settings/tests/js/users/deleteHandlerSpec.js12
1 files changed, 5 insertions, 7 deletions
diff --git a/settings/tests/js/users/deleteHandlerSpec.js b/settings/tests/js/users/deleteHandlerSpec.js
index 6b6328be801..c6d88b32411 100644
--- a/settings/tests/js/users/deleteHandlerSpec.js
+++ b/settings/tests/js/users/deleteHandlerSpec.js
@@ -85,7 +85,7 @@ describe('DeleteHandler tests', function() {
// previous one was delete
expect(fakeServer.requests.length).toEqual(1);
var request = fakeServer.requests[0];
- expect(request.url).toEqual(OC.webroot + '/index.php/settings/ajax/dummyendpoint.php');
+ expect(request.url).toEqual(OC.webroot + '/index.php/dummyendpoint.php/some_uid');
});
it('automatically deletes after timeout', function() {
var handler = init(markCallback, removeCallback, undoCallback);
@@ -98,7 +98,7 @@ describe('DeleteHandler tests', function() {
clock.tick(3000);
expect(fakeServer.requests.length).toEqual(1);
var request = fakeServer.requests[0];
- expect(request.url).toEqual(OC.webroot + '/index.php/settings/ajax/dummyendpoint.php');
+ expect(request.url).toEqual(OC.webroot + '/index.php/dummyendpoint.php/some_uid');
});
it('deletes when deleteEntry is called', function() {
var handler = init(markCallback, removeCallback, undoCallback);
@@ -107,7 +107,7 @@ describe('DeleteHandler tests', function() {
handler.deleteEntry();
expect(fakeServer.requests.length).toEqual(1);
var request = fakeServer.requests[0];
- expect(request.url).toEqual(OC.webroot + '/index.php/settings/ajax/dummyendpoint.php');
+ expect(request.url).toEqual(OC.webroot + '/index.php/dummyendpoint.php/some_uid');
});
it('cancels deletion when undo is clicked', function() {
var handler = init(markCallback, removeCallback, undoCallback);
@@ -135,7 +135,7 @@ describe('DeleteHandler tests', function() {
expect(fakeServer.requests.length).toEqual(0);
});
it('calls removeCallback after successful server side deletion', function() {
- fakeServer.respondWith(/\/index\.php\/settings\/ajax\/dummyendpoint.php/, [
+ fakeServer.respondWith(/\/index\.php\/dummyendpoint.php\/some_uid/, [
200,
{ 'Content-Type': 'application/json' },
JSON.stringify({status: 'success'})
@@ -148,7 +148,6 @@ describe('DeleteHandler tests', function() {
expect(fakeServer.requests.length).toEqual(1);
var request = fakeServer.requests[0];
var query = OC.parseQueryString(request.requestBody);
- expect(query.paramid).toEqual('some_uid');
expect(removeCallback.calledOnce).toEqual(true);
expect(undoCallback.notCalled).toEqual(true);
@@ -157,7 +156,7 @@ describe('DeleteHandler tests', function() {
it('calls undoCallback and shows alert after failed server side deletion', function() {
// stub t to avoid extra calls
var tStub = sinon.stub(window, 't').returns('text');
- fakeServer.respondWith(/\/index\.php\/settings\/ajax\/dummyendpoint.php/, [
+ fakeServer.respondWith(/\/index\.php\/dummyendpoint.php\/some_uid/, [
200,
{ 'Content-Type': 'application/json' },
JSON.stringify({status: 'error', data: {message: 'test error'}})
@@ -171,7 +170,6 @@ describe('DeleteHandler tests', function() {
expect(fakeServer.requests.length).toEqual(1);
var request = fakeServer.requests[0];
var query = OC.parseQueryString(request.requestBody);
- expect(query.paramid).toEqual('some_uid');
expect(removeCallback.notCalled).toEqual(true);
expect(undoCallback.calledOnce).toEqual(true);