diff --git a/search/src/test/scala/weco/api/search/generators/BucketGenerators.scala b/search/src/test/scala/weco/api/search/generators/BucketGenerators.scala index 962411de8..5075a0a54 100644 --- a/search/src/test/scala/weco/api/search/generators/BucketGenerators.scala +++ b/search/src/test/scala/weco/api/search/generators/BucketGenerators.scala @@ -15,8 +15,7 @@ trait BucketGenerators { |"count": $count, |"data": { | "id": "$code", - | "label": "$label", - | "type": "$dataType" + | "label": "$label" |}, |"type": "AggregationBucket" |}""".stripMargin).right.get diff --git a/search/src/test/scala/weco/api/search/models/AggregationResultsTest.scala b/search/src/test/scala/weco/api/search/models/AggregationResultsTest.scala index 8be06bb87..55b0f9b18 100644 --- a/search/src/test/scala/weco/api/search/models/AggregationResultsTest.scala +++ b/search/src/test/scala/weco/api/search/models/AggregationResultsTest.scala @@ -125,35 +125,37 @@ class AggregationResultsTest extends AnyFunSpec with Matchers { _aggregationsAsMap = Map( "format" -> Map( "doc_count" -> 12345, - "format" -> Map( - "doc_count_error_upper_bound" -> 0, - "sum_other_doc_count" -> 0, - "buckets" -> List( - Map( - "key" -> "123", - "doc_count" -> 393145, - "labels" -> Map( - "buckets" -> List( - Map( - "key" -> "absinthe", - "doc_count" -> 393145 + "nested" -> Map( + "format" -> Map( + "doc_count_error_upper_bound" -> 0, + "sum_other_doc_count" -> 0, + "buckets" -> List( + Map( + "key" -> "123", + "doc_count" -> 393145, + "labels" -> Map( + "buckets" -> List( + Map( + "key" -> "absinthe", + "doc_count" -> 393145 + ) ) ) - ) - ), - Map( - "key" -> "456", - "doc_count" -> 34, - "labels" -> Map( - "buckets" -> List( - Map( - "key" -> "apple", - "doc_count" -> 34 + ), + Map( + "key" -> "456", + "doc_count" -> 34, + "labels" -> Map( + "buckets" -> List( + Map( + "key" -> "apple", + "doc_count" -> 34 + ) ) ) ) ) - ), + ) ) ) )