Sha256: 3c445aa348728098797e7deba4e7d3fc92ef2c46045e8f4f56fb7325af820bf5
Contents?: true
Size: 662 Bytes
Versions: 10
Compression:
Stored size: 662 Bytes
Contents
RSpec.describe Percy::Client::Connection do describe '#get' do it 'performs a GET request to the api_url and parses response' do stub_request(:get, "#{Percy.config.api_url}/test").to_return(body: {foo: true}.to_json) data = Percy.client.get("#{Percy.config.api_url}/test") expect(data).to eq({'foo' => true}) end end describe '#post' do it 'performs a POST request to the api_url and parses response' do stub_request(:post, "#{Percy.config.api_url}/test").to_return(body: {foo: true}.to_json) data = Percy.client.post("#{Percy.config.api_url}/test", {}) expect(data).to eq({'foo' => true}) end end end
Version data entries
10 entries across 10 versions & 1 rubygems