Skip to content

Commit 5f6c211

Browse files
committed
Add test for new POST auth/logout call.
1 parent 4948eeb commit 5f6c211

File tree

2 files changed

+15
-2
lines changed

2 files changed

+15
-2
lines changed

test/apicalls.js

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,19 @@ describe("API", function () {
7777
});
7878
});
7979

80+
describe("post('auth/logout')", function () {
81+
it('should log out user', function () {
82+
return cm.post('auth/logout').then((resp) => {
83+
assert.ok(resp);
84+
});
85+
});
86+
it('should automatically log back in and get a list of Media', function () {
87+
return cm.get('media', { 'limit': 10 }).then((media) => {
88+
assert.ok(media.list);
89+
});
90+
});
91+
});
92+
8093
describe("post('storage')", function () {
8194
it('should get heartbeat of Players', function () {
8295
return cm.post('storage', { 'ids': plrids }).then((uuid) => {
@@ -215,4 +228,4 @@ describe("API", function () {
215228
});
216229
});
217230
});
218-
});
231+
});

test/connection.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,4 @@
22
"baseurl": "http://localhost/ContentManager",
33
"username": "user",
44
"password": "pass"
5-
}
5+
}

0 commit comments

Comments
 (0)