Sha256: e506af9755898f7f9729dc5c80c2e88595e82df522f7b7efe95cb22a71e28969

Contents?: true

Size: 1.01 KB

Versions: 41

Compression:

Stored size: 1.01 KB

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 'takes eu-west-1 as an alias for EU' do
    endpoint = S3Website::Endpoint.new('eu-west-1')
    endpoint.location_constraint.should eq('eu-west-1')
    S3Website::Endpoint.new.location_constraints['EU'].should eq(S3Website::Endpoint.new.location_constraints['eu-west-1'])
  end

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

Version data entries

41 entries across 41 versions & 2 rubygems

Version Path
s3_website-1.8.2 spec/lib/endpoint_spec.rb
s3_website-1.8.1 spec/lib/endpoint_spec.rb
s3_website-1.8.0 spec/lib/endpoint_spec.rb
s3_website_monadic-0.0.15 spec/lib/endpoint_spec.rb
s3_website_monadic-0.0.14 spec/lib/endpoint_spec.rb
s3_website_monadic-0.0.13 spec/lib/endpoint_spec.rb
s3_website_monadic-0.0.12 spec/lib/endpoint_spec.rb
s3_website_monadic-0.0.11 spec/lib/endpoint_spec.rb
s3_website_monadic-0.0.9 spec/lib/endpoint_spec.rb
s3_website_monadic-0.0.8 spec/lib/endpoint_spec.rb
s3_website_monadic-0.0.7 spec/lib/endpoint_spec.rb
s3_website_monadic-0.0.6 spec/lib/endpoint_spec.rb
s3_website_monadic-0.0.5 spec/lib/endpoint_spec.rb
s3_website-1.7.6 spec/lib/endpoint_spec.rb
s3_website_monadic-0.0.4 spec/lib/endpoint_spec.rb
s3_website_monadic-0.0.3 spec/lib/endpoint_spec.rb
s3_website-1.7.5 spec/lib/endpoint_spec.rb
s3_website_monadic-0.0.2 spec/lib/endpoint_spec.rb
s3_website_monadic-0.0.1 spec/lib/endpoint_spec.rb
s3_website-1.7.4 spec/lib/endpoint_spec.rb