diff --git a/tests/src/test/scala/ch/epfl/bluebrain/nexus/tests/HttpClient.scala b/tests/src/test/scala/ch/epfl/bluebrain/nexus/tests/HttpClient.scala index fd8b1e05c5..cf1247141f 100644 --- a/tests/src/test/scala/ch/epfl/bluebrain/nexus/tests/HttpClient.scala +++ b/tests/src/test/scala/ch/epfl/bluebrain/nexus/tests/HttpClient.scala @@ -55,7 +55,7 @@ class HttpClient private (baseUrl: Uri, httpExt: HttpExt)(implicit )(implicit um: FromEntityUnmarshaller[A]): IO[Assertion] = requestAssert(POST, url, Some(body), identity, extraHeaders)(assertResponse) - def post2[A](url: String, body: IO[Json], identity: Identity, extraHeaders: Seq[HttpHeader] = jsonHeaders)( + def postIO[A](url: String, body: IO[Json], identity: Identity, extraHeaders: Seq[HttpHeader] = jsonHeaders)( assertResponse: (A, HttpResponse) => Assertion )(implicit um: FromEntityUnmarshaller[A]): IO[Assertion] = { body.flatMap(body => requestAssert(POST, url, Some(body), identity, extraHeaders)(assertResponse)) @@ -66,7 +66,7 @@ class HttpClient private (baseUrl: Uri, httpExt: HttpExt)(implicit )(implicit um: FromEntityUnmarshaller[A]): IO[Assertion] = requestAssert(PUT, url, Some(body), identity, extraHeaders)(assertResponse) - def put2[A](url: String, body: IO[Json], identity: Identity, extraHeaders: Seq[HttpHeader] = jsonHeaders)( + def putIO[A](url: String, body: IO[Json], identity: Identity, extraHeaders: Seq[HttpHeader] = jsonHeaders)( assertResponse: (A, HttpResponse) => Assertion )(implicit um: FromEntityUnmarshaller[A]): IO[Assertion] = { body.flatMap(body => requestAssert(PUT, url, Some(body), identity, extraHeaders)(assertResponse)) diff --git a/tests/src/test/scala/ch/epfl/bluebrain/nexus/tests/kg/SchemasSpec.scala b/tests/src/test/scala/ch/epfl/bluebrain/nexus/tests/kg/SchemasSpec.scala index c345130d6d..c12ef9b903 100644 --- a/tests/src/test/scala/ch/epfl/bluebrain/nexus/tests/kg/SchemasSpec.scala +++ b/tests/src/test/scala/ch/epfl/bluebrain/nexus/tests/kg/SchemasSpec.scala @@ -28,10 +28,12 @@ class SchemasSpec extends BaseIntegrationSpec { root.shapes.index(0).minCount.int.getOption(json) shouldEqual Some(value) for { - _ <- deltaClient.post2[Json](s"/schemas/$project", withMinCount(schemaId, minCount = 1), Rick) { expectCreated } + _ <- deltaClient.postIO[Json](s"/schemas/$project", withMinCount(schemaId, minCount = 1), Rick) { + expectCreated + } _ <- deltaClient - .put2[Json]( + .putIO[Json]( s"/schemas/$project/${UrlUtils.encode(schemaId)}?rev=1", withMinCount(schemaId, minCount = 2), Rick @@ -81,13 +83,13 @@ class SchemasSpec extends BaseIntegrationSpec { ) for { - _ <- deltaClient.post2[Json]( + _ <- deltaClient.postIO[Json]( s"/schemas/$project", withPowerLevelShape(id = powerLevelSchemaId, maxPowerLevel = 10000), Rick ) { expectCreated } _ <- deltaClient - .post2[Json]( + .postIO[Json]( s"/schemas/$project", withImportOfPowerLevelShape(id = schemaId, importedSchemaId = powerLevelSchemaId), Rick @@ -99,7 +101,7 @@ class SchemasSpec extends BaseIntegrationSpec { Rick ) { expectCreated } _ <- deltaClient - .put2[Json]( + .putIO[Json]( s"/schemas/$project/${UrlUtils.encode(powerLevelSchemaId)}?rev=1", withPowerLevelShape(id = powerLevelSchemaId, maxPowerLevel = 9000), Rick