Sha256: 6a6eac622ed440ee528d23d463cd6eb52367910f690d776642625ec63e415b9a
Contents?: true
Size: 1.02 KB
Versions: 46
Compression:
Stored size: 1.02 KB
Contents
require "spec_helper" describe Fog::Core::Utils do describe "prepare_service_settings" do it "changes String keys to be Symbols" do settings = { "a" => 3 } expected = { :a => 3 } assert_equal expected, Fog::Core::Utils.prepare_service_settings(settings) end it "leaves Symbol keys unchanged" do settings = { :something => 2 } expected = { :something => 2 } assert_equal expected, Fog::Core::Utils.prepare_service_settings(settings) end it "changes nested String keys to Symbols" do settings = { "connection_options" => { "val" => 5 } } expected = { :connection_options => { :val => 5 } } assert_equal expected, Fog::Core::Utils.prepare_service_settings(settings) end it "does not change the :header key or contents" do settings = { :headers => { "User-Agent" => "my user agent" } } expected = { :headers => { "User-Agent" => "my user agent" } } assert_equal expected, Fog::Core::Utils.prepare_service_settings(settings) end end end
Version data entries
46 entries across 43 versions & 3 rubygems