No effective change - adjust test adding @Draft property to @Draftable Document

This commit is contained in:
rob bygrave
2018-08-14 14:16:08 +12:00
parent ce10dd79f9
commit 95dab97b1b
2 changed files with 13 additions and 0 deletions
@@ -1,6 +1,7 @@
package org.tests.model.draftable;
import io.ebean.Finder;
import io.ebean.annotation.Draft;
import io.ebean.annotation.DraftOnly;
import io.ebean.annotation.Draftable;
@@ -25,6 +26,9 @@ public class Document extends BaseDomain {
String body;
@Draft
boolean draft;
@DraftOnly
Timestamp whenPublish;
@@ -54,6 +58,14 @@ public class Document extends BaseDomain {
this.body = body;
}
public boolean isDraft() {
return draft;
}
public void setDraft(boolean draft) {
this.draft = draft;
}
public Organisation getOrganisation() {
return organisation;
}
@@ -34,6 +34,7 @@ public class TestTransactionTryResources extends BaseTestCase {
Document document = Document.find.asDraft(doc.getId());
assertThat(document).isNotNull();
assertThat(document.isDraft()).isTrue();
// cleanup
Ebean.delete(document);