Skip to content

Commit

Permalink
Update payload variable name in test
Browse files Browse the repository at this point in the history
  • Loading branch information
olivergrabinski authored Oct 13, 2023
1 parent bec526d commit d807060
Showing 1 changed file with 7 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -85,17 +85,18 @@ class ElasticSearchViewsSpec extends BaseSpec with EitherValuable with CirceEq {
}

"fail to create a view with an invalid mapping" in {
val invalidMapping =
val invalidMapping =
json"""{"mapping": "fail"}"""
val payload = json"""{ "@type": "ElasticSearchView", "mapping": $invalidMapping }"""
deltaClient.put[Json](s"/views/$fullId/invalid", payload, ScoobyDoo) { expectBadRequest }
val payloadWithInvalidMapping = json"""{ "@type": "ElasticSearchView", "mapping": $invalidMapping }"""
deltaClient.put[Json](s"/views/$fullId/invalid", payloadWithInvalidMapping, ScoobyDoo) { expectBadRequest }
}

"fail to create a view with invalid settings" in {
val invalidSettings =
val invalidSettings =
json"""{"analysis": "fail"}"""
val payload = json"""{ "@type": "ElasticSearchView", "mapping": { }, "settings": $invalidSettings }"""
deltaClient.put[Json](s"/views/$fullId/invalid", payload, ScoobyDoo) { expectBadRequest }
val payloadWithInvalidSettings =
json"""{ "@type": "ElasticSearchView", "mapping": { }, "settings": $invalidSettings }"""
deltaClient.put[Json](s"/views/$fullId/invalid", payloadWithInvalidSettings, ScoobyDoo) { expectBadRequest }
}

"create people view in project 2" in {
Expand Down

0 comments on commit d807060

Please sign in to comment.