Created
April 16, 2014 21:40
-
-
Save Veraticus/10935960 to your computer and use it in GitHub Desktop.
This file contains 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
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