@Test public void hasViewPermissionDefinedShouldReturnFalseIfAuthorizationIsNotDefined() { PipelineConfigs group = createWithPipeline(PipelineConfigMother.pipelineConfig("pipeline1")); assertThat( "hasViewPermissionDefinedShouldReturnFalseIfAuthorizationIsNotDefined", group.hasViewPermissionDefined(), is(false)); }
@Test public void hasViewPermissionDefinedShouldReturnTrueIfAuthorizationIsDefined() { PipelineConfigs group = createWithPipeline(PipelineConfigMother.pipelineConfig("pipeline1")); group.getAuthorization().getViewConfig().add(new AdminUser(new CaseInsensitiveString("jez"))); assertThat( "hasViewPermissionDefinedShouldReturnTrueIfAuthorizationIsDefined", group.hasViewPermissionDefined(), is(true)); }