Created
November 1, 2012 20:07
-
-
Save dangerbell/3996121 to your computer and use it in GitHub Desktop.
Example of using SuperTest in Mocha
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
request = require 'supertest' | |
app = require process.cwd() + '/app.coffee' | |
describe 'Connectors', -> | |
describe 'create', -> | |
it "should return a 400 error if there is no type specified", (done) -> | |
request(app) | |
.post("/connectors") | |
.set( 'Authorization', "MoverApi app_id=embiggen app_secret=cromulent" ) | |
.send( {} ) | |
.expect(400, { | |
status: "Missing Parameter", | |
msg: "Must specify a type to create a connector. See documentation at http://mover.io/docs" }, | |
done | |
) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment