Sha256: 92c041292ec18f87a19c90306ca84656af33cf8d8a2193685752399501c3680b
Contents?: true
Size: 1007 Bytes
Versions: 2
Compression:
Stored size: 1007 Bytes
Contents
require 'spec_helper' module Jellyfish module Fog module AWS describe Storage do it 'provisions and retires storage using fog' do enable_aws_fog_provisioning Storage.new(order_item).provision expect(order_item.provision_status).to eq 'ok' order_item.payload_response = JSON.parse(order_item.payload_response) expect(order_item.payload_response).to include('key' => "id-#{order_item.uuid}") Storage.new(order_item).retire expect(order_item.provision_status).to eq 'retired' end def order_item @order_item ||= OpenStruct.new.tap do |order_item| order_item.uuid = '1234567890' end end def enable_aws_fog_provisioning ::Fog.mock! allow_any_instance_of(::Provisioner).to receive(:aws_settings).and_return( access_key: 'access key id', secret_key: 'secret access key' ) end end end end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
jellyfish_fog_aws-0.1.0 | spec/lib/jellyfish_fog_aws/storage_spec.rb |
jellyfish_fog_aws-0.0.1 | spec/lib/jellyfish_fog_aws/storage_spec.rb |