Skip to content

Instantly share code, notes, and snippets.

@maxschulze
Created January 17, 2013 18:06
Show Gist options
  • Save maxschulze/4558098 to your computer and use it in GitHub Desktop.
Save maxschulze/4558098 to your computer and use it in GitHub Desktop.
describe VotesController do
describe "POST 'create'" do
it "should return json success" do
user_vote = stub_model(UserVote, :save => true)
UserVote.stub(:new).with({ip_address: "127.0.0.1", mics: 2, round_id: 1, rapper_id: 1}) { user_vote }
post :create, user_vote: { ip_address: "127.0.0.1", mics: 2, round_id: 1, rapper_id: 1 }
response.should be_success
end
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment