Refactor git commit id examples

This commit is contained in:
Grzegorz Piwowarek 2016-08-14 16:01:57 +02:00
parent 1d511d4336
commit 91d12fe986
3 changed files with 12 additions and 7 deletions

View File

@ -6,6 +6,7 @@ import org.springframework.web.bind.annotation.RestController;
@RestController
public class CommitInfoController {
@Value("${git.commit.message.short}")
private String commitMessage;

View File

@ -22,11 +22,16 @@ public class CommitIdTest {
@Test
public void shouldInjectGitInfoProperties() throws Exception {
assertThat(commitMessage).isNotNull();
assertThat(commitMessage).isNotEqualTo("${git.commit.message.short}");
assertThat(branch).isNotNull();
assertThat(branch).isNotEqualTo("${git.branch}");
assertThat(commitId).isNotNull();
assertThat(commitId).isNotEqualTo("${git.commit.id}");
assertThat(commitMessage)
.isNotNull()
.isNotEqualTo("${git.commit.message.short}");
assertThat(branch)
.isNotNull()
.isNotEqualTo("${git.branch}");
assertThat(commitId)
.isNotNull()
.isNotEqualTo("${git.commit.id}");
}
}

@ -1 +0,0 @@
Subproject commit b3e635b96d114e25ca1da696acfd881b5fac28a7