Created
September 21, 2012 02:05
-
-
Save csquared/3759389 to your computer and use it in GitHub Desktop.
Simple Coffeescript Bootstrap test with vows and api-easy
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
APIEasy = require('api-easy') | |
assert = require('assert') | |
process.env.NODE_DEBUG = true | |
process.env.NODE_ENV = 'test' | |
process.env.PORT = 8080 | |
process.env.DATABASE_URL = process.env.TEST_DATABASE_URL | |
app = require('../app') | |
suite = APIEasy.describe("api") | |
suite.discuss("When using the awesome api") | |
.use('localhost', 8080) | |
.get('/') | |
.expect(200, {ok: true}) | |
.setHeader('Content-Type', 'application/json') | |
.post('/', {ok: "test"}) | |
.expect(200, {ok: true}) | |
.expect("something else", (err, resp, body) ->) | |
.export(module) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment