Skip to content

Commit

Permalink
revert dubious test and update docs to reflect intended behavior
Browse files Browse the repository at this point in the history
  • Loading branch information
jeffscottbrown committed Jul 18, 2018
1 parent c252222 commit b66be1d
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 31 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@ import io.micronaut.http.HttpStatus
import io.micronaut.http.MediaType
import io.micronaut.http.client.RxHttpClient
import io.micronaut.runtime.server.EmbeddedServer
import spock.lang.Ignore
import spock.lang.Specification

import java.util.function.Consumer
Expand Down Expand Up @@ -103,24 +102,6 @@ class WebFunctionSpec extends Specification {
embeddedServer.stop()
}

// TODO
@Ignore
void 'test camel cased function bean'() {
given:
EmbeddedServer embeddedServer = ApplicationContext.run(EmbeddedServer)
RxHttpClient client = embeddedServer.applicationContext.createBean(RxHttpClient, embeddedServer.getURL())

when:
HttpResponse<String> response = client.toBlocking().exchange('/hello-world', String)

then:
response.code() == HttpStatus.OK.code
response.body() == 'hello there world'

cleanup:
embeddedServer.stop()

}
void "test string consumer with text plain"() {
given:
EmbeddedServer embeddedServer = ApplicationContext.run(EmbeddedServer)
Expand Down Expand Up @@ -170,17 +151,6 @@ class WebFunctionSpec extends Specification {
}
}

@FunctionBean("helloWorld")
static class CamelCaseSupplier implements Supplier<String> {
String getValue() {
return "hello there world"
}
@Override
String get() {
return getValue()
}
}

@FunctionBean("supplier/pojo")
static class PojoSupplier implements Supplier<Book> {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,6 @@ The URI mapped to is defined by the either the value of the ann:function.Functio
|Annotation|URI

|`@FunctionBean("hello")` | `/hello`
|`@FunctionBean("helloWorld")` | `/hello-world`
|`@FunctionBean("hello-world")` | `/hello-world`

|===
Expand Down

0 comments on commit b66be1d

Please sign in to comment.