Sha256: 649f5ab4c61bf98cb47fc48841bc8e77b8fb3d9c2f11a7b0d8c96ef14df3e9a0
Contents?: true
Size: 549 Bytes
Versions: 13
Compression:
Stored size: 549 Bytes
Contents
require 'spec_helper' require './lib/vzaar/request/url' describe Vzaar::Request::Url do let(:params) do { foo: 1, bar: 2 } end let(:format) { :xml } let(:url) { "/api/endpoint" } subject { described_class.new(url, format, params) } describe "#build" do context "when there are params" do specify { expect(subject.build).to eq("/api/endpoint.xml?foo=1&bar=2") } end context "when there are params" do let(:params) {{}} specify { expect(subject.build).to eq("/api/endpoint.xml") } end end end
Version data entries
13 entries across 13 versions & 1 rubygems