Sha256: 4f889502fed8f5dd9e31b32eb425e4b21e65dcf3581f6ccbe4afa230aa5b0b29

Contents?: true

Size: 756 Bytes

Versions: 21

Compression:

Stored size: 756 Bytes

Contents

require 'spec_helper'
require 'pp'

describe S3Website::Endpoint do

  it 'uses the DEFAULT_LOCATION_CONSTRAINT constant to set the default location constraint' do
    endpoint = S3Website::Endpoint.new
    endpoint.location_constraint.should eq(S3Website::Endpoint::DEFAULT_LOCATION_CONSTRAINT)
  end

  it 'uses the "us-east-1" as the default location' do
    S3Website::Endpoint::DEFAULT_LOCATION_CONSTRAINT.should eq('us-east-1')
  end

  it 'takes a valid location constraint as a constructor parameter' do
    endpoint = S3Website::Endpoint.new('EU')
    endpoint.location_constraint.should eq('EU')
  end

  it 'fails if the location constraint is invalid' do
    expect {
      S3Website::Endpoint.new('andromeda')
    }.to raise_error
  end
end


Version data entries

21 entries across 21 versions & 1 rubygems

Version Path
s3_website-1.4.3 spec/lib/endpoint_spec.rb
s3_website-1.4.2 spec/lib/endpoint_spec.rb
s3_website-1.4.1 spec/lib/endpoint_spec.rb
s3_website-1.4.0 spec/lib/endpoint_spec.rb
s3_website-1.3.2 spec/lib/endpoint_spec.rb
s3_website-1.3.1 spec/lib/endpoint_spec.rb
s3_website-1.3.0 spec/lib/endpoint_spec.rb
s3_website-1.2.1 spec/lib/endpoint_spec.rb
s3_website-1.2.0 spec/lib/endpoint_spec.rb
s3_website-1.1.2 spec/lib/endpoint_spec.rb
s3_website-1.1.1 spec/lib/endpoint_spec.rb
s3_website-1.1.0 spec/lib/endpoint_spec.rb
s3_website-1.0.3 spec/lib/endpoint_spec.rb
s3_website-1.0.2 spec/lib/endpoint_spec.rb
s3_website-1.0.1 spec/lib/endpoint_spec.rb
s3_website-1.0.0 spec/lib/endpoint_spec.rb
s3_website-0.4.0 spec/lib/endpoint_spec.rb
s3_website-0.3.0 spec/lib/endpoint_spec.rb
s3_website-0.2.1 spec/lib/endpoint_spec.rb
s3_website-0.2.0 spec/lib/endpoint_spec.rb