Skip to content

Instantly share code, notes, and snippets.

@AJFaraday
Created May 30, 2012 10:42
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save AJFaraday/2835431 to your computer and use it in GitHub Desktop.
Save AJFaraday/2835431 to your computer and use it in GitHub Desktop.
json test?
def test_search_json
post :search, :option => 'all', :text => 'task', :format => :json
assert_response :success
json = JSON.parse(@respnose.body)
assert_equal 'task', json['text']
assert_equal 1, json['hit_list'].count
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment