Skip to content

Pretty printing truncates non-json responses that happen to begin with valid json #730

Closed
@OrangeDog

Description

@OrangeDog

The following test passes

mockMvc.perform(post(URI))
        .andExpect(status().isOk())
        .andExpect(content().contentType("text/csv"))
        .andExpect(content().string("0.33\r\nnull\r\n8.20\r\n"))
        .andDo(document("example"));

But example/http-response.snippet only has:

[source,http,options="nowrap"]
----
HTTP/1.1 200 OK
Content-Type: text/csv
Content-Length: 4

0.33
----

spring-restdocs-mockmvc 2.0.5.RELEASE

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions