fauna / faunadb-ruby

Ruby driver for FaunaDB

Home Page:https://fauna.com

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Handle invalid responses

andy-faunadb opened this issue · comments

def test_invalid_response
  # Response must be valid JSON
  assert_raises ??? do
    (stub_get 200, 'I like fine wine').get ''
  end
  # Response must have "resource"
  assert_raises ??? do
    (stub_get 200, '{"resoars": 1}').get ''
  end
end