Added tests

This commit is contained in:
Marcin Grzejszczak
2018-10-23 15:31:27 +02:00
parent f9f8282539
commit 96bd2c9efe
2 changed files with 12 additions and 0 deletions

View File

@@ -49,6 +49,17 @@ public class PostReleaseActionsTests {
FileSystemUtils.copyRecursively(file("/projects/"), this.temporaryFolder);
}
@Test
public void should_do_nothing_when_the_switch_is_off() {
this.properties.getGit().setRunUpdatedSamples(false);
PostReleaseActions actions = new PostReleaseActions(this.projectGitHandler,
this.updater, this.builder, this.properties);
actions.runUpdatedTests(currentGa());
BDDAssertions.then(clonedTestSamples).isNull();
}
@Test
public void should_update_project_and_run_tests() {
this.properties.getGit().setTestSamplesProjectUrl(tmpFile("spring-cloud-core-tests/").getAbsolutePath() + "/");