Package models

Examples of models.Article.validate()


        article.save();
       
        // Still no activity for the article
        assertEquals(0, Activity.count("article = ?", article));
       
        article.validate();
        // 1 comment activity amongst others
        assertEquals(1, CommentArticleActivity.count("article = ?", article));
        Activity a = CommentArticleActivity.find("article = ?", article).first();
        assertActivity(a);
        assertTrue(a instanceof CommentArticleActivity);
View Full Code Here


       
        // No activity for the article
        assertEquals(0, Activity.count("article = ?", a));
        assertNull(Activity.find("article = ?", a).first());
       
        a.validate();
       
        // One activity for the article
        assertEquals(1, Activity.count("article = ?", a));
        Activity act = Activity.find("article = ?", a).first();
        assertActivity(act);
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.