mirror of
https://github.com/fog/fog.git
synced 2022-11-09 13:51:43 -05:00
Use proper signature when testing with aws mock
This commit is contained in:
parent
2f226adcba
commit
b111aedbce
1 changed files with 7 additions and 1 deletions
|
@ -13,8 +13,14 @@ Shindo.tests('AWS | url') do
|
|||
|
||||
@file = @storage.directories.new(key: 'fognonbucket').files.new(key: 'test.txt')
|
||||
|
||||
if Fog.mock?
|
||||
signature = Fog::Storage::AWS.new.signature(nil)
|
||||
else
|
||||
signature = 'tajHIhKHAdFYsigmzybCpaq8N0Q%3D'
|
||||
end
|
||||
|
||||
tests('#url w/ response-cache-control').returns(
|
||||
'https://fognonbucket.s3.amazonaws.com/test.txt?response-cache-control=No-cache&AWSAccessKeyId=123&Signature=tajHIhKHAdFYsigmzybCpaq8N0Q%3D&Expires=1356998400'
|
||||
"https://fognonbucket.s3.amazonaws.com/test.txt?response-cache-control=No-cache&AWSAccessKeyId=123&Signature=#{signature}&Expires=1356998400"
|
||||
) do
|
||||
@file.url(@expires, query: { 'response-cache-control' => 'No-cache' })
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue