Permalink
Browse files

test: Updating stdout expectations to new format

  • Loading branch information...
anth0d committed Aug 18, 2017
1 parent 53cd595 commit 5dcf724613b3531b265c1e34ed227354de0c60f3
@@ -480,7 +480,7 @@ describe 'CLI', ->
)
it 'should notify skipping to the stdout', ->
assert.include runtimeInfo.dredd.stdout, 'skip: GET /machines'
assert.include runtimeInfo.dredd.stdout, 'skip: GET (200) /machines'
it 'should hit the only transaction', ->
assert.deepEqual runtimeInfo.server.requestCounts, {'/message': 1}
@@ -548,7 +548,7 @@ describe 'Dredd class Integration', ->
assert.include stderr, 'Fixed transaction name'
describe('when Swagger document has multiple responses', ->
reTransaction = /(\w+): (\w+) \/honey/g
reTransaction = /(\w+): (\w+) \(\d+\) \/honey/g
matches = undefined
beforeEach((done) ->
@@ -577,7 +577,7 @@ describe 'Dredd class Integration', ->
)
describe('when Swagger document has multiple responses and hooks unskip some of them', ->
reTransaction = /(\w+): (\w+) \/honey/g
reTransaction = /(\w+): (\w+) \(\d+\) \/honey/g
matches = undefined
beforeEach((done) ->
@@ -237,7 +237,7 @@ describe 'Regression: Issues #319 and #354', ->
describe 'Attributes defined in resource are referenced from payload [GET /bricks/XYZ42]', ->
it 'fails on missing required property and invalid type', ->
assert.include results.failures[0], 'GET /bricks/XYZ42'
assert.include results.failures[0], 'GET (200) /bricks/XYZ42'
assert.include results.failures[1], 'Missing required property: name'
assert.include results.failures[1], 'Invalid type: number'
it 'has no request body', ->
@@ -251,7 +251,7 @@ describe 'Regression: Issues #319 and #354', ->
describe 'Attributes defined in resource are referenced from action [POST /bricks]', ->
it 'fails on missing required property and invalid type', ->
assert.include results.failures[2], 'POST /bricks'
assert.include results.failures[2], 'POST (200) /bricks'
assert.include results.failures[3], 'Missing required property: name'
assert.include results.failures[3], 'Invalid type: number'
it 'has correct request body', ->
@@ -265,7 +265,7 @@ describe 'Regression: Issues #319 and #354', ->
describe 'Attributes defined as data structure are referenced from payload [GET /customers]', ->
it 'fails on invalid type', ->
assert.include results.failures[4], 'GET /customers'
assert.include results.failures[4], 'GET (200) /customers'
assert.include results.failures[5], 'Invalid type: object'
it 'has no request body', ->
assert.isUndefined results.bodies[6]
@@ -278,7 +278,7 @@ describe 'Regression: Issues #319 and #354', ->
describe 'Attributes defined as data structure are referenced from action [POST /customers]', ->
it 'fails on invalid types', ->
assert.include results.failures[6], 'POST /customers'
assert.include results.failures[6], 'POST (200) /customers'
assert.include results.failures[7], 'Invalid type: null'
assert.include results.failures[7], 'Invalid type: string'
it 'has correct request body', ->
@@ -322,7 +322,7 @@ describe 'TransactionRunner', ->
it 'should callback with a properly configured transaction', (done) ->
runner.configureTransaction transaction, (err, configuredTransaction) ->
assert.equal configuredTransaction.name, 'Group Machine > Machine > Delete Message > Bogus example name'
assert.equal configuredTransaction.id, 'POST /machines'
assert.equal configuredTransaction.id, 'POST (202) /machines'
assert.isOk configuredTransaction.host
assert.isOk configuredTransaction.request
assert.isOk configuredTransaction.expected
@@ -337,7 +337,7 @@ describe 'TransactionRunner', ->
it 'should join the endpoint path with transaction uriTemplate together', (done) ->
runner.configureTransaction transaction, (err, configuredTransaction) ->
assert.equal configuredTransaction.id, 'POST /machines'
assert.equal configuredTransaction.id, 'POST (202) /machines'
assert.strictEqual configuredTransaction.host, 'hostname.tld'
assert.equal configuredTransaction.port, 9876
assert.strictEqual configuredTransaction.protocol, 'https:'
@@ -347,7 +347,7 @@ describe 'TransactionRunner', ->
it 'should keep trailing slash in url if present', (done) ->
transaction.request.uri = '/machines/'
runner.configureTransaction transaction, (err, configuredTransaction) ->
assert.equal configuredTransaction.id, 'POST /machines/'
assert.equal configuredTransaction.id, 'POST (202) /machines/'
assert.strictEqual configuredTransaction.fullPath, '/my/path/to/api' + '/machines/'
done()
@@ -356,7 +356,7 @@ describe 'TransactionRunner', ->
beforeEach ->
transaction =
name: 'Group Machine > Machine > Delete Message > Bogus example name'
id: 'POST /machines'
id: 'POST (202) /machines'
host: '127.0.0.1'
port: '3000'
request:

0 comments on commit 5dcf724

Please sign in to comment.