spec/lib/endpoint_spec.rb in s3_website-1.4.3 vs spec/lib/endpoint_spec.rb in s3_website-1.4.4
- old
+ new
@@ -15,13 +15,17 @@
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
-
-