Skip to content

Commit

Permalink
add integration tests for response.status_code
Browse files Browse the repository at this point in the history
  • Loading branch information
vdel26 committed Mar 2, 2016
1 parent 719dbd2 commit 974bac6
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions test/integration_test.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -20,17 +20,20 @@ describe 'Integration tests for the 3Scale::Client', ->
client = new Client provider_key
client.authorize {app_key: application_key, app_id: application_id}, (response) ->
assert response.is_success()
assert.equal response.status_code, 200
done()

it 'should call the callback with a error response if app_id was wrong', (done) ->
client = new Client provider_key
client.authorize {app_key: application_key, app_id: 'ERROR'}, (response) ->
assert.equal response.is_success(), false
assert.equal response.status_code, 404
done()

describe 'The report method', ->
it 'should give a success response with the correct params', (done) ->
client = new Client provider_key
client.report report_test, (response) ->
assert response.is_success()
assert.equal response.status_code, 200
done()

0 comments on commit 974bac6

Please sign in to comment.