Last active
August 29, 2015 14:27
-
-
Save libbyschuknight/ada04fa0acd670f6e64e to your computer and use it in GitHub Desktop.
Example test for api
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
describe "GET /users" do | |
before do | |
5.times {FactoryGirl.create(:user)} | |
get "/api/v1/users/" | |
end | |
it "shoudl return all the users as json" do | |
expect(last_response.body).to eq(User.all.to_json) | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment