Commit 3bdc3e8f authored by Sascha Pfeiffer's avatar Sascha Pfeiffer

Fixing unittests

parent 54c2b710
......@@ -169,10 +169,7 @@
$httpBackend.when('POST', "https://www.psono.pw/server/authentication/logout/").respond(
function(method, url, data, headers, params) {
// Validate request parameters:
data = JSON.parse(data);
// will fail for everything that is no ISO date and return NAN which is not bigger than 0
expect(Date.parse(data.request_time) > 0).toBeTruthy();
expect(data === JSON.stringify({})).toBeTruthy();
expect(headers.Authorization).toEqual('Token ' + token);
expect(headers['Authorization-Validator']).toEqual(jasmine.any(String));
......@@ -198,8 +195,6 @@
data = JSON.parse(data);
expect(data.session_id).toEqual(session_id);
// will fail for everything that is no ISO date and return NAN which is not bigger than 0
expect(Date.parse(data.request_time) > 0).toBeTruthy();
expect(headers.Authorization).toEqual('Token ' + token);
expect(headers['Authorization-Validator']).toEqual(jasmine.any(String));
......
......@@ -116,8 +116,6 @@
data = JSON.parse(data);
expect(data.session_id).toEqual(session_id);
// will fail for everything that is no ISO date and return NAN which is not bigger than 0
expect(Date.parse(data.request_time) > 0).toBeTruthy();
expect(headers.Authorization).toEqual('Token ' + token);
expect(headers['Authorization-Validator']).toEqual(jasmine.any(String));
......
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