Skip to content

Instantly share code, notes, and snippets.

@electronicbites
Created November 12, 2012 15:23
Show Gist options
  • Save electronicbites/4059945 to your computer and use it in GitHub Desktop.
Save electronicbites/4059945 to your computer and use it in GitHub Desktop.
require './spec/support/factories.rb'
user = FactoryGirl.create(:user)
game = FactoryGirl.create(:photo_game)
task = game.tasks.last
task.timeout_secs = 20
task.save
app.post '/api/v1/login', login: user.username, password: 'secret'
app.post "/api/v1/games/#{game.id}/buy.json"
app.post 'api/v1/my/tasks/11/start.json'
app.response.status
json = JSON.parse app.response.body
app.get 'api/v1/my/friends.json'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment