Sha256: dd887a646bcab602e9db9cdf576c020c820edf99352b7c7506150b14df86c2b4

Contents?: true

Size: 574 Bytes

Versions: 2

Compression:

Stored size: 574 Bytes

Contents

require 'test/test_helper'
require 'aws-sdk-v1'

class AwsSdkCommandsTest < Test::Unit::TestCase
  def setup
    @s3 = AWS::S3.new(:access_key_id => '123',
                      :secret_access_key => 'abc',
                      :s3_endpoint => 'localhost',
                      :s3_port => 10453,
                      :use_ssl => false)
  end

  def test_copy_to
    bucket = @s3.buckets["test_copy_to"]
    object = bucket.objects["key1"]
    object.write("asdf")

    assert object.exists?
    object.copy_to("key2")

    assert_equal 2, bucket.objects.count
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
fakes3-0.2.0 test/aws_sdk_commands_test.rb
fakes3-0.1.7 test/aws_sdk_commands_test.rb