Skip to content

Commit

Permalink
Fixing test
Browse files Browse the repository at this point in the history
  • Loading branch information
freddyDOTCMS committed May 27, 2022
1 parent 0efb651 commit 1541ff7
Showing 1 changed file with 12 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1215,7 +1215,7 @@ public void savingFieldWithUniqueFieldInDifferentHostUniquePerSiteToFalse() thro

new FieldVariableDataGen()
.key(UNIQUE_PER_SITE_FIELD_VARIABLE_NAME)
.value("true")
.value("false")
.field(uniqueTextField)
.nextPersisted();

Expand Down Expand Up @@ -1325,19 +1325,24 @@ private void checkFilter(final Host host, final VanityUrl vanityURL, final int s
*/
@Test
public void savingFieldWithUniqueFieldInDifferentHostUsingContentTypeHost() throws DotDataException, DotSecurityException {
final ContentType contentType = new ContentTypeDataGen()
.nextPersisted();

final Field uniqueTextField = new FieldDataGen()
.contentTypeId(contentType.id())
.unique(true)
.type(TextField.class)
.next();

final Host host1 = new SiteDataGen().nextPersisted();
final Host host2 = new SiteDataGen().nextPersisted();
.nextPersisted();

final ContentType contentType = new ContentTypeDataGen()
.host(host2)
new FieldVariableDataGen()
.key(UNIQUE_PER_SITE_FIELD_VARIABLE_NAME)
.value("true")
.field(uniqueTextField)
.nextPersisted();

final Host host1 = new SiteDataGen().nextPersisted();
final Host host2 = new SiteDataGen().nextPersisted();

final Contentlet contentlet_1 = new ContentletDataGen(contentType)
.host(host1)
.setProperty(uniqueTextField.variable(), "unique-value")
Expand Down

0 comments on commit 1541ff7

Please sign in to comment.