Skip to content

Commit

Permalink
#514 setting collection active field when transformed from an institu…
Browse files Browse the repository at this point in the history
…tion
  • Loading branch information
marcos-lg committed Aug 31, 2023
1 parent dfc3176 commit 9eb5401
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@
import static org.junit.jupiter.api.Assertions.assertNotEquals;
import static org.junit.jupiter.api.Assertions.assertNotNull;
import static org.junit.jupiter.api.Assertions.assertThrows;
import static org.junit.jupiter.api.Assertions.assertTrue;

/** Tests the {@link InstitutionMergeService}. */
public class InstitutionMergeServiceIT extends BaseMergeServiceIT<Institution> {
Expand Down Expand Up @@ -130,6 +131,7 @@ public void convertToCollectionWithExistingInstitutionTest() {
toConvert.setCode("tco");
toConvert.setName("to convert");
toConvert.setDescription("desc");
toConvert.setActive(true);
institutionService.create(toConvert);

Institution another = new Institution();
Expand All @@ -146,6 +148,7 @@ public void convertToCollectionWithExistingInstitutionTest() {

Collection newCollection = collectionService.get(newCollectionKey);
assertEquals(another.getKey(), newCollection.getInstitutionKey());
assertTrue(newCollection.isActive());
}

@Test
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,7 @@ public UUID convertToCollection(
newCollection.setHomepage(institutionToConvert.getHomepage());
newCollection.setCatalogUrl(institutionToConvert.getCatalogUrl());
newCollection.setApiUrl(institutionToConvert.getApiUrl());
newCollection.setActive(institutionToConvert.isActive());

if (institutionToConvert.getAddress() != null) {
Address address = institutionToConvert.getAddress();
Expand Down

0 comments on commit 9eb5401

Please sign in to comment.