1
0
Fork 0
mirror of https://github.com/fog/fog.git synced 2022-11-09 13:51:43 -05:00
fog--fog/tests/rackspace/rackspace_tests.rb

21 lines
No EOL
994 B
Ruby

Shindo.tests('Fog::Rackspace', ['rackspace']) do
tests('normalize_url') do
tests('should return nil if endpoint is nil').returns(nil) do
Fog::Rackspace.normalize_url nil
end
tests('should remove trailing spaces').returns("https://dfw.blockstorage.api.rackspacecloud.com/v1") do
Fog::Rackspace.normalize_url "https://dfw.blockstorage.api.rackspacecloud.com/v1 "
end
tests('should remove trailing /').returns("https://dfw.blockstorage.api.rackspacecloud.com/v1") do
Fog::Rackspace.normalize_url "https://dfw.blockstorage.api.rackspacecloud.com/v1/"
end
tests('should downcase url').returns("https://dfw.blockstorage.api.rackspacecloud.com/v1") do
Fog::Rackspace.normalize_url "HTTPS://DFW.BLOCKSTORAGE.API.RACKSPACECLOUD.COM/V1"
end
tests('show do all three').returns("https://dfw.blockstorage.api.rackspacecloud.com/v1") do
Fog::Rackspace.normalize_url "HTTPS://DFW.BLOCKSTORAGE.API.RACKSPACECLOUD.COM/V1/ "
end
end
end