Skip to content

Commit

Permalink
[ISSUE-1254] Add unit test to PublicAssetSerializerTest
Browse files Browse the repository at this point in the history
  • Loading branch information
HoussemNasri committed Dec 10, 2024
1 parent f018c83 commit 2b9ef71
Showing 1 changed file with 14 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -135,6 +135,20 @@ class PublicAssetSerializerTest {
.isTrue
}

@Test
def deserializeCreationRequestShouldFailWhenUnknownPropertySpecified(): Unit = {
val jsInput: JsValue = Json.parse(
"""{
| "blobId": "1234",
| "unknown": "something"
|}""".stripMargin)

val deserializeResult: JsResult[PublicAssetSetCreationRequest] = PublicAssetSerializer.deserializePublicAssetSetCreationRequest(jsInput)

assertThat(deserializeResult.isError)
.isTrue
}

@Test
def serializePublicAssetSetResponseShouldSucceed(): Unit = {
val response = PublicAssetSetResponse(
Expand Down

0 comments on commit 2b9ef71

Please sign in to comment.