Sha256: a380687ced5ba1d89c50d77a67da6715a7997e4b9b8ef9b5ea2655a990ee4354

Contents?: true

Size: 1.16 KB

Versions: 21

Compression:

Stored size: 1.16 KB

Contents

describe 'Hash#sort_array!' do
  let(:hash) do
    {:users=>
      {"bob"=>
        {:path=>"/devloper/",
         :groups=>[],
         :policies=>
          {"S3"=>
            {"Statement"=>
              [{"Action"=>["s3:Put*", "s3:List*", "s3:Get*"],
                "Effect"=>"Allow",
                "Resource"=>"*"}]}},
         :attached_managed_policies=>[
          "arn:aws:iam::aws:policy/AmazonElastiCacheReadOnlyAccess",
          "arn:aws:iam::aws:policy/AmazonEC2ReadOnlyAccess"],
         :login_profile=>{:password_reset_required=>true}}}}
  end

  let(:expected_hash) do
    {:users=>
      {"bob"=>
        {:path=>"/devloper/",
         :groups=>[],
         :policies=>
          {"S3"=>
            {"Statement"=>
              [{"Action"=>["s3:Get*", "s3:List*", "s3:Put*"],
                "Effect"=>"Allow",
                "Resource"=>"*"}]}},
         :attached_managed_policies=>[
          "arn:aws:iam::aws:policy/AmazonEC2ReadOnlyAccess",
          "arn:aws:iam::aws:policy/AmazonElastiCacheReadOnlyAccess"],
         :login_profile=>{:password_reset_required=>true}}}}
  end

  subject { hash.sort_array! }

  it { is_expected.to eq expected_hash }
end

Version data entries

21 entries across 21 versions & 1 rubygems

Version Path
miam-0.2.4.beta14 spec/miam/hash_ext_spec.rb
miam-0.2.4.beta13 spec/miam/hash_ext_spec.rb
miam-0.2.4.beta12 spec/miam/hash_ext_spec.rb
miam-0.2.4.beta11 spec/miam/hash_ext_spec.rb
miam-0.2.4.beta10 spec/miam/hash_ext_spec.rb
miam-0.2.4.beta9 spec/miam/hash_ext_spec.rb
miam-0.2.4.beta8 spec/miam/hash_ext_spec.rb
miam-0.2.4.beta7 spec/miam/hash_ext_spec.rb
miam-0.2.4.beta6 spec/miam/hash_ext_spec.rb
miam-0.2.4.beta5 spec/miam/hash_ext_spec.rb
miam-0.2.4.beta4 spec/miam/hash_ext_spec.rb
miam-0.2.4.beta3 spec/miam/hash_ext_spec.rb
miam-0.2.4.beta2 spec/miam/hash_ext_spec.rb
miam-0.2.4.beta spec/miam/hash_ext_spec.rb
miam-0.2.3 spec/miam/hash_ext_spec.rb
miam-0.2.3.beta3 spec/miam/hash_ext_spec.rb
miam-0.2.3.beta2 spec/miam/hash_ext_spec.rb
miam-0.2.3.beta spec/miam/hash_ext_spec.rb
miam-0.2.2 spec/miam/hash_ext_spec.rb
miam-0.2.2.beta4 spec/miam/hash_ext_spec.rb