use of org.mamute.model.Information in project mamute by caelum.
the class NewsController method saveEdit.
@Post
@CustomBrutauthRules(EditNewsRule.class)
public void saveEdit(@Load News news, String title, MarkedText description, String comment) {
Information newInformation = new NewsInformation(title, description, currentUser, comment);
news.enqueueChange(newInformation, UpdateStatus.NO_NEED_TO_APPROVE);
result.redirectTo(this).showNews(news, news.getSluggedTitle());
}
use of org.mamute.model.Information in project mamute by caelum.
the class InformationDAOTest method should_find_pending_answers_edits.
@Test
public void should_find_pending_answers_edits() {
Answer answer = answer("info1 info1 info1 info1 info1 info1 info1 ", question, author);
session.save(answer);
newPendingChangesAnswer(answer, 2);
ModeratableAndPendingHistory pendingByUpdatables = informations.pendingByUpdatables(Answer.class);
List<Information> pendingInfoForAnswer = pendingByUpdatables.pendingInfoFor(answer);
assertEquals(2, pendingInfoForAnswer.size());
}
Aggregations