Merge branch '2.5.x'
Closes gh-28483
This commit is contained in:
commit
ef2bcdd3ed
@ -136,13 +136,21 @@ class MongoDataAutoConfigurationTests {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
void customAutoIndexCreation() {
|
void defaultAutoIndexCreation() {
|
||||||
this.contextRunner.withPropertyValues("spring.data.mongodb.autoIndexCreation:false").run((context) -> {
|
this.contextRunner.run((context) -> {
|
||||||
MongoMappingContext mappingContext = context.getBean(MongoMappingContext.class);
|
MongoMappingContext mappingContext = context.getBean(MongoMappingContext.class);
|
||||||
assertThat(mappingContext.isAutoIndexCreation()).isFalse();
|
assertThat(mappingContext.isAutoIndexCreation()).isFalse();
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
void customAutoIndexCreation() {
|
||||||
|
this.contextRunner.withPropertyValues("spring.data.mongodb.autoIndexCreation:true").run((context) -> {
|
||||||
|
MongoMappingContext mappingContext = context.getBean(MongoMappingContext.class);
|
||||||
|
assertThat(mappingContext.isAutoIndexCreation()).isTrue();
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
void interfaceFieldNamingStrategy() {
|
void interfaceFieldNamingStrategy() {
|
||||||
this.contextRunner
|
this.contextRunner
|
||||||
|
Loading…
x
Reference in New Issue
Block a user