Sha256: b280bfda4729b1c08c5f5367b978d50ea76c1110b5b0d9d71795c4b67476a8d6
Contents?: true
Size: 614 Bytes
Versions: 6
Compression:
Stored size: 614 Bytes
Contents
require "spec_helper" RSpec.describe PortalConnectors::BaseClient do let(:client) { PortalConnectors::BaseClient.singleton } describe "#post_with_signature" do it "deal with decimal correctly" do allow(client).to receive(:host).and_return "https://base.client" allow(client).to receive(:secret).and_return "secret-1" expect(Curl).to receive(:post) do |_url, json| params = JSON.parse(json) expect(params["amount"]).to eq "0.009" end client.send(:post_with_signature, "https://base.client/url", address: "1abd", amount: BigDecimal("0.009")) end end end
Version data entries
6 entries across 6 versions & 1 rubygems