Search in sources :

Example 1 with UserDigest

use of org.activityinfo.server.digest.UserDigest in project activityinfo by bedatadriven.

the class GeoDigestModelBuilderTest method testEmptyDigestsAreNotSent.

@Test
public void testEmptyDigestsAreNotSent() throws Exception {
    // only notification
    User user = em.find(User.class, 1);
    LocalDate today = new LocalDate(2041, 1, 1);
    UserDigest userDigest = new UserDigest(user, today.atMidnightInMyTimezone(), 1, "testToken");
    GeoDigestModel model = geoDigestModelBuilder.createModel(userDigest);
    assertThat(model.hasData(), equalTo(false));
}
Also used : UserDigest(org.activityinfo.server.digest.UserDigest) User(org.activityinfo.server.database.hibernate.entity.User) LocalDate(com.bedatadriven.rebar.time.calendar.LocalDate) Test(org.junit.Test)

Aggregations

LocalDate (com.bedatadriven.rebar.time.calendar.LocalDate)1 User (org.activityinfo.server.database.hibernate.entity.User)1 UserDigest (org.activityinfo.server.digest.UserDigest)1 Test (org.junit.Test)1