mirror of
https://github.com/scm-manager/scm-manager.git
synced 2026-01-28 18:29:10 +01:00
Merge branch 'develop' into feature/template_plugin
This commit is contained in:
@@ -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));
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user