use of org.mamute.dao.ModeratorOrVisibleNewsFilter in project mamute by caelum.
the class ModeratorOrVisibleNewsFilterTest method should_not_add_filter_if_user_is_moderator.
@Test
public void should_not_add_filter_if_user_is_moderator() {
LoggedUser user = new LoggedUser(user("leonardo", "leo@leo.com").asModerator(), null);
ModeratorOrVisibleNewsFilter moderatorOrVisible = new ModeratorOrVisibleNewsFilter(user, null);
moderatorOrVisible.addFilter("x", criteria);
verify(criteria, never()).add(Mockito.any(Criterion.class));
}
Aggregations