mirror of
https://github.com/ebean-orm/ebean.git
synced 2024-04-21 10:51:47 +00:00
No effective change - adjust test adding @Draft property to @Draftable Document
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user