Skip to content
This repository was archived by the owner on Nov 8, 2024. It is now read-only.
This repository was archived by the owner on Nov 8, 2024. It is now read-only.

trailing newline fails text/plain #67

@jsongHBO

Description

@jsongHBO

Is there a solution for
apiaryio/snowcrash#56
?

due to the inserted \n, comparing text/plain will always fail the dredd test.

Here's my transaction in the after hook

{ name: 'GET animals > Via id > Retuning text',
  id: 'GET /animals/G1234',
  host: 'localhost',
  port: '3000',
  request: 
   { body: '{}\n',
     headers: 
      { Accept: 'text/plain',
        'content-type': 'text/plain',
        'User-Agent': 'Dredd/0.3.1 (Darwin 13.1.0; x64)',
        'Content-Length': 3 },
     uri: '/animals/G1234',
     method: 'GET' },
  expected: 
   { headers: { 'Content-Type': 'text/plain' },
   **body: 'G1234\n',**
     statusCode: '200' },
  fullPath: '/animals/G1234',
  real: 
   { statusCode: 200,
     headers: 
      {
        'content-type': 'text/plain',
        'content-length': '5',
        connection: 'keep-alive' },
     **body: 'G1234'** } }

and my markdown is simply

    + Response 200 (text/plain)

        ```
        G1234
        ```

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions