DATAMONGO-799 - Fix failing test in MongoTemplateTests on MongoDB 2.5.x.
Generalized exception message matching to reflect the changed exception message in MongoDB 2.5.x that also works with previous versions of MongoDB. Original pull request: #97.
This commit is contained in:
committed by
Oliver Gierke
parent
54e6a80ca9
commit
1d5df555f0
@@ -213,6 +213,7 @@ public class MongoTemplateTests {
|
||||
|
||||
/**
|
||||
* @see DATAMONGO-480
|
||||
* @see DATAMONGO-799
|
||||
*/
|
||||
@Test
|
||||
public void throwsExceptionForUpdateWithInvalidPushOperator() {
|
||||
@@ -228,8 +229,10 @@ public class MongoTemplateTests {
|
||||
|
||||
thrown.expect(DataIntegrityViolationException.class);
|
||||
thrown.expectMessage("Execution");
|
||||
thrown.expectMessage("$push");
|
||||
thrown.expectMessage("UPDATE");
|
||||
thrown.expectMessage("array");
|
||||
thrown.expectMessage("firstName");
|
||||
thrown.expectMessage("failed");
|
||||
|
||||
Query query = new Query(Criteria.where("firstName").is("Amol"));
|
||||
Update upd = new Update().push("age", 29);
|
||||
|
||||
Reference in New Issue
Block a user