Skip to content

Instantly share code, notes, and snippets.

@Veraticus
Created April 16, 2014 21:40
Show Gist options
  • Save Veraticus/10935960 to your computer and use it in GitHub Desktop.
Save Veraticus/10935960 to your computer and use it in GitHub Desktop.
def test_show_success
event = events(:good_event1) # Loading the event from a fixture file
Event.expects(:find).with('4').returns(event).once
get :show, id: 4
assert_response :success
body = JSON.parse(response.body)
assert_equal 'Title', body.title
assert_equal 'Markup', body.markup
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment