Skip to content

Commit

Permalink
TRUNK-6203 fix failing tests
Browse files Browse the repository at this point in the history
  • Loading branch information
dkayiwa committed Jul 8, 2024
1 parent 28fc5a7 commit deb4289
Showing 1 changed file with 4 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@

import org.junit.Assert;
import org.junit.Test;
import org.openmrs.api.context.Context;
import org.openmrs.api.context.UserContext;
import org.openmrs.module.uiframework.PageController;
import org.openmrs.ui.framework.page.FileDownload;
import org.openmrs.ui.framework.page.PageFactory;
Expand Down Expand Up @@ -53,6 +55,8 @@ public void shouldHandleFileDownloadReturnType() throws Exception {
controller.setPageFactory(pageFactory);
controller.setSessionFactory(sessionFactory);

Context.setUserContext(new UserContext());

controller.handlePath("somemodule/download", request, response, new ExtendedModelMap(), session);

Assert.assertEquals("text/plain", response.getContentType());
Expand Down

0 comments on commit deb4289

Please sign in to comment.