File tree 2 files changed +5
-1
lines changed
examples/spring-txn/src/test
java/cucumber/examples/spring/txn
resources/cucumber/examples/spring/txn
2 files changed +5
-1
lines changed Original file line number Diff line number Diff line change 4
4
import org .springframework .beans .factory .annotation .Autowired ;
5
5
import org .springframework .test .context .ContextConfiguration ;
6
6
import org .springframework .test .context .web .WebAppConfiguration ;
7
+ import org .springframework .transaction .support .TransactionSynchronizationManager ;
8
+
9
+ import static org .junit .Assert .assertTrue ;
7
10
8
11
import java .util .List ;
9
12
@@ -31,5 +34,7 @@ public void a_User_has_posted_the_following_messages(List<Message> messages) thr
31
34
m .setAuthor (user );
32
35
messageRepository .save (m );
33
36
}
37
+ assertTrue ("No transaction is active" ,
38
+ TransactionSynchronizationManager .isActualTransactionActive ());
34
39
}
35
40
}
Original file line number Diff line number Diff line change 1
- @txn
2
1
Feature : See Messages
3
2
4
3
Scenario : See another user's messages
You can’t perform that action at this time.
0 commit comments