Merge branch 'develop' into feature/template_plugin

This commit is contained in:
Eduard Heimbuch
2020-09-08 15:44:47 +02:00
51 changed files with 38889 additions and 38437 deletions

View File

@@ -32,6 +32,7 @@ import sonia.scm.repository.NamespaceAndName;
import sonia.scm.repository.Tag;
import java.net.URI;
import java.time.Instant;
import static org.assertj.core.api.Assertions.assertThat;
@@ -58,4 +59,11 @@ class TagToTagDtoMapperTest {
assertThat(dto.getLinks().getLinkBy("yo").get().getHref()).isEqualTo("http://hitchhiker/hog/1.0.0");
}
@Test
void shouldMapDate() {
final long now = Instant.now().getEpochSecond() * 1000;
TagDto dto = mapper.map(new Tag("1.0.0", "42", now), new NamespaceAndName("hitchhiker", "hog"));
assertThat(dto.getDate()).isEqualTo(Instant.ofEpochMilli(now));
}
}