Skip to content

Commit 49cd518

Browse files
Update tests.
Original Pull Request: #4196
1 parent b59c7f7 commit 49cd518

File tree

3 files changed

+6
-4
lines changed

3 files changed

+6
-4
lines changed

spring-data-mongodb/src/test/java/org/springframework/data/mongodb/core/MappingMongoJsonSchemaCreatorUnitTests.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -179,7 +179,7 @@ enum JustSomeEnum {
179179
" 're-named-property' : { 'type' : 'string' }," + //
180180
" 'retypedProperty' : { 'bsonType' : 'javascript' }," + //
181181
" 'primitiveInt' : { 'bsonType' : 'int' }," + //
182-
" 'booleanProperty' : { 'type' : 'boolean' }," + //
182+
" 'booleanProperty' : { 'type' : 'bool' }," + //
183183
" 'longProperty' : { 'bsonType' : 'long' }," + //
184184
" 'intProperty' : { 'bsonType' : 'int' }," + //
185185
" 'dateProperty' : { 'bsonType' : 'date' }," + //

spring-data-mongodb/src/test/java/org/springframework/data/mongodb/core/aggregation/AggregationTests.java

+2
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,7 @@
6666
import org.springframework.data.mongodb.core.query.NearQuery;
6767
import org.springframework.data.mongodb.core.query.Query;
6868
import org.springframework.data.mongodb.repository.Person;
69+
import org.springframework.data.mongodb.test.util.EnableIfMongoServerVersion;
6970
import org.springframework.data.mongodb.test.util.MongoTemplateExtension;
7071
import org.springframework.data.mongodb.test.util.MongoTestTemplate;
7172
import org.springframework.data.mongodb.test.util.MongoVersion;
@@ -315,6 +316,7 @@ void shouldUnwindWithIndex() {
315316
}
316317

317318
@Test // DATAMONGO-1391
319+
@EnableIfMongoServerVersion(isLessThan = "6.0")
318320
void shouldUnwindPreserveEmpty() {
319321

320322
MongoCollection<Document> coll = mongoTemplate.getCollection(INPUT_COLLECTION);

spring-data-mongodb/src/test/java/org/springframework/data/mongodb/core/schema/JsonSchemaObjectUnitTests.java

+3-3
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,7 @@ void objectObjectShouldRenderPropertiesCorrectly() {
133133
.append("description", "Must be an object defining restrictions for name, active.").append("properties",
134134
new Document("name", new Document("type", "string")
135135
.append("description", "Must be a string with length unbounded-10].").append("maxLength", 10))
136-
.append("active", new Document("type", "boolean")));
136+
.append("active", new Document("type", "bool")));
137137

138138
assertThat(object().generatedDescription()
139139
.properties(JsonSchemaProperty.string("name").maxLength(10).generatedDescription(),
@@ -266,7 +266,7 @@ void numberObjectShouldRenderMinimumCorrectly() {
266266
void arrayObjectShouldRenderItemsCorrectly() {
267267

268268
assertThat(array().items(Arrays.asList(string(), bool())).toDocument()).isEqualTo(new Document("type", "array")
269-
.append("items", Arrays.asList(new Document("type", "string"), new Document("type", "boolean"))));
269+
.append("items", Arrays.asList(new Document("type", "string"), new Document("type", "bool"))));
270270
}
271271

272272
@Test // DATAMONGO-2613
@@ -316,7 +316,7 @@ void arrayObjectShouldRenderAdditionalItemsItemsCorrectly() {
316316
void booleanShouldRenderCorrectly() {
317317

318318
assertThat(bool().generatedDescription().toDocument())
319-
.isEqualTo(new Document("type", "boolean").append("description", "Must be a boolean."));
319+
.isEqualTo(new Document("type", "bool").append("description", "Must be a boolean."));
320320
}
321321

322322
// -----------------

0 commit comments

Comments
 (0)