Skip to content

Commit 44a1123

Browse files
committed
Adopt to changed Mockk artifact name.
Closes #4161
1 parent e487c08 commit 44a1123

File tree

2 files changed

+2
-3
lines changed

2 files changed

+2
-3
lines changed

spring-data-mongodb/pom.xml

+1-1
Original file line numberDiff line numberDiff line change
@@ -304,7 +304,7 @@
304304

305305
<dependency>
306306
<groupId>io.mockk</groupId>
307-
<artifactId>mockk</artifactId>
307+
<artifactId>mockk-jvm</artifactId>
308308
<version>${mockk}</version>
309309
<scope>test</scope>
310310
</dependency>

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

+1-2
Original file line numberDiff line numberDiff line change
@@ -2458,8 +2458,7 @@ private MongoTemplate mockOutGetDb() {
24582458

24592459
@Override
24602460
protected MongoOperations getOperationsForExceptionHandling() {
2461-
MongoTemplate template = spy(this.template);
2462-
lenient().when(template.getDb()).thenThrow(new MongoException("Error"));
2461+
when(template.getMongoDatabaseFactory().getMongoDatabase()).thenThrow(new MongoException("Error"));
24632462
return template;
24642463
}
24652464

0 commit comments

Comments
 (0)