mirror of
https://github.com/zadam/trilium.git
synced 2025-11-01 02:45:54 +01:00
etapi improvements and more tests
This commit is contained in:
@@ -1,22 +1,14 @@
|
||||
GET {{triliumHost}}/etapi/inbox/2022-01-01
|
||||
Authorization: {{authToken}}
|
||||
|
||||
> {%
|
||||
client.test("Request executed successfully", function() {
|
||||
client.assert(response.status === 200, "Response status is not 200");
|
||||
});
|
||||
%}
|
||||
> {% client.assert(response.status === 200); %}
|
||||
|
||||
###
|
||||
|
||||
GET {{triliumHost}}/etapi/calendar/days/2022-01-01
|
||||
Authorization: {{authToken}}
|
||||
|
||||
> {%
|
||||
client.test("Request executed successfully", function() {
|
||||
client.assert(response.status === 200, "Response status is not 200");
|
||||
});
|
||||
%}
|
||||
> {% client.assert(response.status === 200); %}
|
||||
|
||||
###
|
||||
|
||||
@@ -24,10 +16,8 @@ GET {{triliumHost}}/etapi/calendar/days/2022-1
|
||||
Authorization: {{authToken}}
|
||||
|
||||
> {%
|
||||
client.test("Correct error handling", function() {
|
||||
client.assert(response.status === 400, "Response status is not 400");
|
||||
client.assert(response.body.code === "DATE_INVALID");
|
||||
});
|
||||
client.assert(response.status === 400);
|
||||
client.assert(response.body.code === "DATE_INVALID");
|
||||
%}
|
||||
|
||||
###
|
||||
@@ -35,11 +25,7 @@ Authorization: {{authToken}}
|
||||
GET {{triliumHost}}/etapi/calendar/weeks/2022-01-01
|
||||
Authorization: {{authToken}}
|
||||
|
||||
> {%
|
||||
client.test("Request executed successfully", function() {
|
||||
client.assert(response.status === 200, "Response status is not 200");
|
||||
});
|
||||
%}
|
||||
> {% client.assert(response.status === 200); %}
|
||||
|
||||
###
|
||||
|
||||
@@ -47,10 +33,8 @@ GET {{triliumHost}}/etapi/calendar/weeks/2022-1
|
||||
Authorization: {{authToken}}
|
||||
|
||||
> {%
|
||||
client.test("Correct error handling", function() {
|
||||
client.assert(response.status === 400, "Response status is not 400");
|
||||
client.assert(response.body.code === "DATE_INVALID");
|
||||
});
|
||||
client.assert(response.status === 400);
|
||||
client.assert(response.body.code === "DATE_INVALID");
|
||||
%}
|
||||
|
||||
###
|
||||
@@ -58,11 +42,7 @@ Authorization: {{authToken}}
|
||||
GET {{triliumHost}}/etapi/calendar/months/2022-01
|
||||
Authorization: {{authToken}}
|
||||
|
||||
> {%
|
||||
client.test("Request executed successfully", function() {
|
||||
client.assert(response.status === 200, "Response status is not 200");
|
||||
});
|
||||
%}
|
||||
> {% client.assert(response.status === 200); %}
|
||||
|
||||
###
|
||||
|
||||
@@ -70,10 +50,8 @@ GET {{triliumHost}}/etapi/calendar/months/2022-1
|
||||
Authorization: {{authToken}}
|
||||
|
||||
> {%
|
||||
client.test("Correct error handling", function() {
|
||||
client.assert(response.status === 400, "Response status is not 400");
|
||||
client.assert(response.body.code === "MONTH_INVALID");
|
||||
});
|
||||
client.assert(response.status === 400);
|
||||
client.assert(response.body.code === "MONTH_INVALID");
|
||||
%}
|
||||
|
||||
###
|
||||
@@ -81,11 +59,7 @@ Authorization: {{authToken}}
|
||||
GET {{triliumHost}}/etapi/calendar/years/2022
|
||||
Authorization: {{authToken}}
|
||||
|
||||
> {%
|
||||
client.test("Request executed successfully", function() {
|
||||
client.assert(response.status === 200, "Response status is not 200");
|
||||
});
|
||||
%}
|
||||
> {% client.assert(response.status === 200); %}
|
||||
|
||||
###
|
||||
|
||||
@@ -93,11 +67,6 @@ GET {{triliumHost}}/etapi/calendar/years/202
|
||||
Authorization: {{authToken}}
|
||||
|
||||
> {%
|
||||
client.test("Correct error handling", function() {
|
||||
client.assert(response.status === 400, "Response status is not 400");
|
||||
client.assert(response.body.code === "YEAR_INVALID");
|
||||
});
|
||||
client.assert(response.status === 400);
|
||||
client.assert(response.body.code === "YEAR_INVALID");
|
||||
%}
|
||||
|
||||
###
|
||||
|
||||
|
||||
Reference in New Issue
Block a user