Allow changes to the reflection to be made after it's been submitted #13
|
@ -113,7 +113,7 @@ public class FinalStepsPanel extends GenericPanel<Project> {
|
|||
IModel<PublishingConsentService.PublishingConsent> publishingConsent = LoadableDetachableModel.of(() ->
|
||||
publishingConsentService.getPublishingConsent(getModelObject(), SciProSession.get().getUser()));
|
||||
|
||||
levelModel = new Model<>();
|
||||
levelModel = new Model<>(publishingConsent.getObject().selected());
|
||||
FormComponent<PublishingConsentService.Level> publishingConsentLevel = new BootstrapRadioChoice<>(
|
||||
"publishingConsentLevel",
|
||||
levelModel,
|
||||
|
|
|
@ -143,6 +143,7 @@ import java.util.*;
|
|||
import static org.mockito.ArgumentMatchers.*;
|
||||
import static org.mockito.Mockito.lenient;
|
||||
import static org.mockito.Mockito.mock;
|
||||
import static org.mockito.Mockito.when;
|
||||
|
||||
@ExtendWith(MockitoExtension.class)
|
||||
public abstract class SciProTest {
|
||||
|
@ -391,6 +392,8 @@ public abstract class SciProTest {
|
|||
publicationMetadata.setProject(answer.getArgument(0));
|
||||
return publicationMetadata;
|
||||
});
|
||||
lenient().when(publishingConsentService.getPublishingConsent(any(), any()))
|
||||
.thenReturn(new PublishingConsentService.PublishingConsent(null, List.of()));
|
||||
}
|
||||
|
||||
@BeforeEach
|
||||
|
|
Loading…
Reference in New Issue
Block a user