Skip to content

Commit 054e4cd

Browse files
Vladimir Kotalahornace
authored andcommitted
add test
1 parent d3689b8 commit 054e4cd

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

opengrok-web/src/test/java/org/opengrok/web/api/v1/controller/ProjectsControllerTest.java

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@
2626
import jakarta.ws.rs.client.Entity;
2727
import jakarta.ws.rs.core.Application;
2828
import jakarta.ws.rs.core.GenericType;
29+
import jakarta.ws.rs.core.Response;
2930
import org.glassfish.jersey.internal.inject.AbstractBinder;
3031
import org.glassfish.jersey.server.ResourceConfig;
3132
import org.junit.jupiter.api.AfterEach;
@@ -480,6 +481,20 @@ void testGetRepos() throws Exception {
480481
assertEquals(Collections.singletonList("Mercurial"), types);
481482
}
482483

484+
@Test
485+
void testSetIndexed() throws Exception {
486+
String project = "git";
487+
addProject(project);
488+
assertEquals(1, env.getProjectList().size());
489+
490+
Response response = target("projects")
491+
.path(project)
492+
.path("property/indexed")
493+
.request()
494+
.put(Entity.text(Boolean.TRUE.toString()));
495+
assertEquals(response.getStatus(), Response.Status.NO_CONTENT.getStatusCode());
496+
}
497+
483498
@Test
484499
void testSetGet() throws Exception {
485500
assertTrue(env.isHandleHistoryOfRenamedFiles());

0 commit comments

Comments
 (0)