public class UpdateSessionActivityTest extends AbstractActivityTest {
@Test
public void updateSessionTalk() {
Talk t = createTalk("test");
// No activity for the talk
assertEquals(0, Activity.count("session = ?", t));
assertNull(Activity.find("session = ?", t).first());
t.summary = "Un nouveau résumé";
t.update();
// Still no activity for the unvalidated talk
assertEquals(0, Activity.count("session = ?", t));
assertNull(Activity.find("session = ?", t).first());
t.valid=true;
t.summary = "Un nouveau nouveau résumé";
t.update();
// One activity for the session
assertEquals(1, Activity.count("session = ?", t));
Activity a = Activity.find("session = ?", t).first();
assertActivity(a);