mirror of
https://github.com/scm-manager/scm-manager.git
synced 2025-11-10 07:25:44 +01:00
map nonFastForwardDisallowed field from GitConfig and added ui
This commit is contained in:
@@ -6,8 +6,7 @@ import org.mockito.InjectMocks;
|
||||
import org.mockito.runners.MockitoJUnitRunner;
|
||||
import sonia.scm.repository.GitConfig;
|
||||
|
||||
import static org.junit.Assert.assertEquals;
|
||||
import static org.junit.Assert.assertFalse;
|
||||
import static org.junit.Assert.*;
|
||||
|
||||
@RunWith(MockitoJUnitRunner.class)
|
||||
public class GitConfigDtoToGitConfigMapperTest {
|
||||
@@ -21,12 +20,14 @@ public class GitConfigDtoToGitConfigMapperTest {
|
||||
GitConfig config = mapper.map(dto);
|
||||
assertEquals("express", config.getGcExpression());
|
||||
assertFalse(config.isDisabled());
|
||||
assertTrue(config.isNonFastForwardDisallowed());
|
||||
}
|
||||
|
||||
private GitConfigDto createDefaultDto() {
|
||||
GitConfigDto gitConfigDto = new GitConfigDto();
|
||||
gitConfigDto.setGcExpression("express");
|
||||
gitConfigDto.setDisabled(false);
|
||||
gitConfigDto.setNonFastForwardDisallowed(true);
|
||||
return gitConfigDto;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user