Skip to content

Commit

Permalink
Remove test that was using internal graphql-java API which has been c…
Browse files Browse the repository at this point in the history
…hanged. Because this test is in a legacy module it's not worth fixing.
  • Loading branch information
paulbakker committed Nov 6, 2024
1 parent d20d2f0 commit 1a76ed1
Showing 1 changed file with 0 additions and 21 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ package com.netflix.graphql.dgs.mvc
import com.fasterxml.jackson.databind.ObjectMapper
import com.netflix.graphql.dgs.DgsQueryExecutor
import graphql.ExecutionResultImpl
import graphql.execution.reactive.SubscriptionPublisher
import org.junit.jupiter.api.Assertions.assertEquals
import org.junit.jupiter.api.Test
import org.mockito.ArgumentCaptor
Expand Down Expand Up @@ -170,26 +169,6 @@ class DgsRestControllerTest {
}
}

@Test
fun `Return an error when a Subscription is attempted on the Graphql Endpoint`() {
val queryString = "subscription { stocks { name } }"

`when`(dgsQueryExecutor.execute(eq(queryString), eq(emptyMap()), any(), any(), any(), any())).thenReturn(
ExecutionResultImpl.newExecutionResult().data(SubscriptionPublisher(null, null)).build(),
)

mvc
.post("/graphql") {
contentType = MediaType.APPLICATION_JSON
content = objectMapper.writeValueAsString(mapOf("query" to queryString))
}.andExpect {
status { isBadRequest() }
content {
string("Trying to execute subscription on /graphql. Use /subscriptions instead!")
}
}
}

@Test
fun `Returns a request error if the no body is present`() {
mvc
Expand Down

0 comments on commit 1a76ed1

Please sign in to comment.