Play! structure 1.2.4 - immediate rescue from morphine

I wrote a selenium test, which represents changes in the runtime of a mongodb object's properties (using the morphine save method), and then checks to see if this property changes. But result variables do not occur. How to make immediate savings?

%{
    // load models
    // deleted = true
}%

#{selenium}            
    click('link=Delete')
    <!--                 
    SomeClass someObj = SomeClass.findById(id);
    someObj.deleted = true;
    someObj.save();
    -->
#{/selenium}

%{
    models.SomeClass someObj2 = models.SomeClass.find("fieldName", "fieldValue").get();
    boolean expectedStatus = someObj2.deleted;
    org.junit.Assert.assertTrue(expectedStatus);
}%

The save method does not change the value in MongoDB during the test. Save work after the test. This is problem

+3
source share
1 answer

WriteConcern . ( ), " ", , , , () X . Morphia:

morpiaDao.delete(company, new WriteConcern(true));
0

All Articles