Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@
* @author Greg Turnquist
* @author Yanming Zhou
* @author Ariel Morelli Andres
* @author Byungju Ju
*/
@ExtendWith(MockitoExtension.class)
@MockitoSettings(strictness = Strictness.LENIENT)
Expand Down Expand Up @@ -182,7 +183,19 @@ void mergeGetsCalledWhenAttached() {
verify(em).merge(attachedUser);
}

@Test // DATAJPA-1535
@Test // GH-4125
void persistGetsCalledWhenEntityIsNew() {

User user = new User();

when(information.isNew(user)).thenReturn(true);

repo.save(user);

verify(em).persist(user);
}

@Test // DATAJPA-1535
void doNothingWhenNewInstanceGetsDeleted() {

User newUser = new User();
Expand Down
Loading