Sha256: 6e7e89ca3c885ca032cf8d9ac32ebfee7119d0aef81bfc430aaff348c2fdf050

Contents?: true

Size: 762 Bytes

Versions: 9

Compression:

Stored size: 762 Bytes

Contents

require 'spec_helper'
require 'pp'

describe Jekyll::S3::Endpoint do

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

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

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

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


Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
jekyll-s3-3.2.0 spec/lib/endpoint_spec.rb
jekyll-s3-3.1.2 spec/lib/endpoint_spec.rb
jekyll-s3-3.1.1 spec/lib/endpoint_spec.rb
jekyll-s3-3.1.0 spec/lib/endpoint_spec.rb
jekyll-s3-3.0.0 spec/lib/endpoint_spec.rb
jekyll-s3-2.8.0 spec/lib/endpoint_spec.rb
jekyll-s3-2.7.0 spec/lib/endpoint_spec.rb
jekyll-s3-2.6.0 spec/lib/endpoint_spec.rb
jekyll-s3-2.5.1 spec/lib/endpoint_spec.rb