-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #118 from mcanoy/archived-projects
allow hooks to be updated after archive if needed
- Loading branch information
Showing
7 changed files
with
54 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
32 changes: 32 additions & 0 deletions
32
src/test/java/com/redhat/labs/lodestar/model/ProjectTest.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
package com.redhat.labs.lodestar.model; | ||
|
||
import java.util.ArrayList; | ||
|
||
import org.junit.jupiter.api.Assertions; | ||
import org.junit.jupiter.api.Test; | ||
|
||
import com.redhat.labs.lodestar.models.gitlab.Project; | ||
|
||
class ProjectTest { | ||
|
||
@Test | ||
void testPreserve() { | ||
|
||
Project project = new Project(); | ||
Assertions.assertNull(project.getTagList()); | ||
|
||
project.setTagList(new ArrayList<>()); | ||
Assertions.assertEquals(0, project.getTagList().size()); | ||
|
||
project.preserve(); | ||
|
||
Assertions.assertEquals(1, project.getTagList().size()); | ||
Assertions.assertEquals("DO_NOT_DELETE", project.getTagList().get(0)); | ||
|
||
//Handle 2nd call properly | ||
project.preserve(); | ||
|
||
Assertions.assertEquals(1, project.getTagList().size()); | ||
Assertions.assertEquals("DO_NOT_DELETE", project.getTagList().get(0)); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -9,3 +9,4 @@ | |
pushEvent: true | ||
pushEventsBranchFilter: master | ||
token: def | ||
enabledAfterArchive: true |