mirror of
https://github.com/sismics/docs.git
synced 2025-12-16 11:15:07 +00:00
Nullable document metadata can be emptied
This commit is contained in:
@@ -104,7 +104,8 @@ public class TestAclResource extends BaseJerseyTest {
|
||||
json = target().path("/document/" + document1Id).request()
|
||||
.cookie(TokenBasedSecurityFilter.COOKIE_NAME, acl2Token)
|
||||
.post(Entity.form(new Form()
|
||||
.param("title", "My new super document 1")), JsonObject.class);
|
||||
.param("title", "My new super document 1")
|
||||
.param("language", "eng")), JsonObject.class);
|
||||
Assert.assertEquals(document1Id, json.getString("id"));
|
||||
|
||||
// Get the document as acl2
|
||||
|
||||
@@ -280,6 +280,7 @@ public class TestDocumentResource extends BaseJerseyTest {
|
||||
.param("source", "My new source for document 1")
|
||||
.param("type", "Image")
|
||||
.param("coverage", "France")
|
||||
.param("language", "eng")
|
||||
.param("rights", "All Rights Reserved")
|
||||
.param("tags", tag2Id)), JsonObject.class);
|
||||
Assert.assertEquals(document1Id, json.getString("id"));
|
||||
@@ -289,7 +290,7 @@ public class TestDocumentResource extends BaseJerseyTest {
|
||||
.cookie(TokenBasedSecurityFilter.COOKIE_NAME, document1Token)
|
||||
.post(Entity.form(new Form()
|
||||
.param("title", "My super title document 2")
|
||||
.param("lang", "eng")), JsonObject.class);
|
||||
.param("language", "eng")), JsonObject.class);
|
||||
Assert.assertEquals(document2Id, json.getString("id"));
|
||||
|
||||
// Search documents by query
|
||||
|
||||
@@ -85,6 +85,8 @@ public class TestTagResource extends BaseJerseyTest {
|
||||
response = target().path("/document/" + document2Id).request()
|
||||
.cookie(TokenBasedSecurityFilter.COOKIE_NAME, tag1Token)
|
||||
.post(Entity.form(new Form()
|
||||
.param("title", "My super document 2")
|
||||
.param("language", "eng")
|
||||
.param("tags", tag3Id)
|
||||
.param("tags", tag4Id)));
|
||||
Assert.assertEquals(Status.OK, Status.fromStatusCode(response.getStatus()));
|
||||
@@ -102,6 +104,8 @@ public class TestTagResource extends BaseJerseyTest {
|
||||
response = target().path("/document/" + document2Id).request()
|
||||
.cookie(TokenBasedSecurityFilter.COOKIE_NAME, tag1Token)
|
||||
.post(Entity.form(new Form()
|
||||
.param("title", "My super document 2")
|
||||
.param("language", "eng")
|
||||
.param("tags", tag4Id)));
|
||||
Assert.assertEquals(Status.OK, Status.fromStatusCode(response.getStatus()));
|
||||
|
||||
|
||||
Reference in New Issue
Block a user