Skip to content

Commit

Permalink
LPS-122660 Fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
David Arques authored and jorgediaz-lr committed Nov 5, 2020
1 parent f58ba3b commit 3a884fd
Showing 1 changed file with 30 additions and 0 deletions.
Expand Up @@ -1331,6 +1331,17 @@ public void testIsSwapConfigurationEnabled() throws Exception {
childAssetVocabulary.getVocabularyId(), serviceContext);

try {
JournalArticle journalArticle = JournalTestUtil.addArticle(
_user.getUserId(), _group.getGroupId(), 0);

_journalArticleLocalService.updateAsset(
_user.getUserId(), journalArticle,
new long[] {
assetCategory.getCategoryId(),
childAssetCategory.getCategoryId()
},
new String[0], new long[0], null);

Assert.assertTrue(_isSwapConfigurationEnabled("audience", "stage"));
}
finally {
Expand Down Expand Up @@ -1358,6 +1369,14 @@ public void testIsSwapConfigurationEnabledWithMissingChildAssetVocabulary()
serviceContext);

try {
JournalArticle journalArticle = JournalTestUtil.addArticle(
_user.getUserId(), _group.getGroupId(), 0);

_journalArticleLocalService.updateAsset(
_user.getUserId(), journalArticle,
new long[] {assetCategory.getCategoryId()}, new String[0],
new long[0], null);

Assert.assertFalse(
_isSwapConfigurationEnabled("audience", "stage"));
}
Expand Down Expand Up @@ -1395,6 +1414,17 @@ public void testIsSwapConfigurationEnabledWithOneAssetVocabularyName()
childAssetVocabulary.getVocabularyId(), serviceContext);

try {
JournalArticle journalArticle = JournalTestUtil.addArticle(
_user.getUserId(), _group.getGroupId(), 0);

_journalArticleLocalService.updateAsset(
_user.getUserId(), journalArticle,
new long[] {
assetCategory.getCategoryId(),
childAssetCategory.getCategoryId()
},
new String[0], new long[0], null);

Assert.assertFalse(_isSwapConfigurationEnabled("audience"));
}
finally {
Expand Down

0 comments on commit 3a884fd

Please sign in to comment.