Created
October 11, 2012 04:47
-
-
Save asalant/3870227 to your computer and use it in GitHub Desktop.
Ubiquitous JS example: Orders Controller spec
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
| {Factory} = require '../../../support/spec_helper' | |
| request = require 'request' | |
| $ = require 'jquery' | |
| describe 'Orders Controller', -> | |
| describe 'when there is an order for pickup', -> | |
| beforeEach -> | |
| Factory.create 'orderForPickup' | |
| it "renders list of orders", (done) -> | |
| request "/orders", (err, response) -> | |
| expect(response.statusCode).toEqual 200 | |
| expect($('.orders li', response.body).length).toEqual 1 | |
| done(err) | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment