Sha256: 9450ab3433e2086326f41891f0b202356ae072fc2ee57de0be4702468346f2a1
Contents?: true
Size: 1.02 KB
Versions: 20
Compression:
Stored size: 1.02 KB
Contents
require 'spec_helper' describe Appsignal::Utils do describe ".sanitize" do context "when params is a hash" do let(:params) { {'foo' => 'bar'} } it "should sanitize all hash values with a questionmark" do expect( Appsignal::Utils.sanitize(params) ).to eq('foo' => '?') end end context "when params is an array of hashes" do let(:params) { [{'foo' => 'bar'}] } it "should sanitize all hash values with a questionmark" do expect( Appsignal::Utils.sanitize(params) ).to eq([{'foo' => '?'}]) end end context "when params is an array of strings " do let(:params) { ['foo', 'bar'] } it "should sanitize all hash values with a single questionmark" do expect( Appsignal::Utils.sanitize(params) ).to eq(['?']) end end context "when params is a string" do let(:params) { 'bar'} it "should sanitize all hash values with a questionmark" do expect( Appsignal::Utils.sanitize(params) ).to eq('?') end end end end
Version data entries
20 entries across 20 versions & 1 rubygems