|
|
@ -49,16 +49,13 @@ class MongoReactiveDataAutoConfigurationTests {
|
|
|
|
|
|
|
|
|
|
|
|
@Test
|
|
|
|
@Test
|
|
|
|
void whenNoGridFsDatabaseIsConfiguredTheGridFsTemplateUsesTheMainDatabase() {
|
|
|
|
void whenNoGridFsDatabaseIsConfiguredTheGridFsTemplateUsesTheMainDatabase() {
|
|
|
|
this.contextRunner.run((context) -> {
|
|
|
|
this.contextRunner.run((context) -> assertThat(grisFsTemplateDatabaseName(context)).isEqualTo("test"));
|
|
|
|
assertThat(grisFsTemplateDatabaseName(context)).isEqualTo("test");
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
@Test
|
|
|
|
@Test
|
|
|
|
void whenGridFsDatabaseIsConfiguredThenGridFsTemplateUsesIt() {
|
|
|
|
void whenGridFsDatabaseIsConfiguredThenGridFsTemplateUsesIt() {
|
|
|
|
this.contextRunner.withPropertyValues("spring.data.mongodb.gridFsDatabase:grid").run((context) -> {
|
|
|
|
this.contextRunner.withPropertyValues("spring.data.mongodb.gridFsDatabase:grid")
|
|
|
|
assertThat(grisFsTemplateDatabaseName(context)).isEqualTo("grid");
|
|
|
|
.run((context) -> assertThat(grisFsTemplateDatabaseName(context)).isEqualTo("grid"));
|
|
|
|
});
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
@Test
|
|
|
|
@Test
|
|
|
|