Skip to content
Permalink
Browse files
fix(add-test-file): add response file for test case (DSP-1841) (#1894)
* add response file for test case

* fix typo in test data
  • Loading branch information
irinaschubert committed Aug 4, 2021
1 parent e0e9073 commit 028e685f31d95604df78ecf09aad908728fab82c
@@ -237,6 +237,7 @@ test-data/v2/resources/testding.json
test-data/v2/resources/thing-with-picture.json
test-data/v2/resources/update-resource-metadata-request-with-last-mod-date.json
test-data/v2/resources/update-resource-metadata-request.json
test-data/v2/resources/update-resource-metadata-response-with-last-mod-date.json
test-data/v2/resources/update-resource-metadata-response.json
test-data/v2/search/
test-data/v2/search/thing-links.json
@@ -218,7 +218,7 @@ class PermissionsADME2ESpec extends E2ESpec(PermissionsADME2ESpec.config) with T
val customAPIri = "http://rdfh.ch/permissions/0001/u0PRnDl3kgcbrehZnRlEfA"
val createAdministrativePermissionWithCustomIriRequest: String =
s"""{
| "id": "$customAPIri,
| "id": "$customAPIri",
| "forGroup":"${SharedTestDataADM.thingSearcherGroup.id}",
| "forProject":"${SharedTestDataADM.ANYTHING_PROJECT_IRI}",
| "hasPermissions":[{"additionalInformation":null,"name":"ProjectAdminGroupAllPermission","permissionCode":null}]
@@ -1626,6 +1626,17 @@ class ResourcesRouteV2E2ESpec extends E2ESpec(ResourcesRouteV2E2ESpec.config) {
newLastModificationDate = newModificationDate,
maybeNewPermissions = newPermissions)))

clientTestDataCollector.addFile(
TestDataFileContent(
filePath = TestDataFilePath(
directoryPath = clientTestDataPath,
filename = "update-resource-metadata-response-with-last-mod-date",
fileExtension = "json"
),
text = updateResponseAsString
)
)

val previewRequest = Get(s"$baseApiUrl/v2/resourcespreview/${URLEncoder.encode(resourceIri, "UTF-8")}") ~> addCredentials(
BasicHttpCredentials(anythingUserEmail, password))
val previewResponse: HttpResponse = singleAwaitingRequest(previewRequest)

0 comments on commit 028e685

Please sign in to comment.