Sha256: fe5927ef756b8b805059ec0d88e9f91a6f07715862665e17edc23f81c4e867b5
Contents?: true
Size: 519 Bytes
Versions: 92
Compression:
Stored size: 519 Bytes
Contents
require 'spec_helper' require 'flydata/api_client' module Flydata describe ApiClient do subject { described_class.instance } let(:resource) { double('resource') } let(:response) { JSON.parse('{"success":true}') } describe "#post" do it do expect(RestClient::Resource).to receive(:new).and_return(resource) expect(resource).to receive(:post).with(nil, accept: :json).and_return(response.to_json) expect(subject.post('/user')).to eq(response) end end end end
Version data entries
92 entries across 92 versions & 1 rubygems