mirror of
https://github.com/fog/fog.git
synced 2022-11-09 13:51:43 -05:00
add a basic spec for Rackspace::Storage#get_object_https_url
This commit is contained in:
parent
ac068a470d
commit
096c735bf3
1 changed files with 8 additions and 1 deletions
|
@ -35,6 +35,13 @@ Shindo.tests('Fog::Storage[:rackspace] | object requests', [:rackspace]) do
|
|||
Fog::Storage[:rackspace].delete_object('fogobjecttests', 'fog_object')
|
||||
end
|
||||
|
||||
tests("#get_object_https_url('fogobjecttests', 'fog_object','expiration timestamp')").succeeds do
|
||||
pending if Fog.mocking?
|
||||
expires_at = Time.now + 60
|
||||
object_url = Fog::Storage[:rackspace].get_object_https_url('fogobjecttests', 'fog_object', expires_at)
|
||||
object_url =~ /https:\/\/.*clouddrive.com\/[^\/]+\/[^\/]+\/fogobjecttests\/fog_object\?temp_url_sig=[0-9a-f]{40}&temp_url_expires=#{expires_at.to_i}/
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
tests('failure') do
|
||||
|
@ -75,4 +82,4 @@ Shindo.tests('Fog::Storage[:rackspace] | object requests', [:rackspace]) do
|
|||
@directory.destroy
|
||||
end
|
||||
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Add table
Reference in a new issue