diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2020-09-04 18:08:46 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2020-09-04 18:08:46 +0300 |
commit | adf76f8f1d6da3ecbd8aa5d2da68dc8456283e8f (patch) | |
tree | 8f422d83a2690d0fdb3fd0ee55cf225e40fd976a /spec/initializers | |
parent | 6724a6ee6b0898470e20f294f1328cc01891756a (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/initializers')
-rw-r--r-- | spec/initializers/carrierwave_patch_spec.rb | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/spec/initializers/carrierwave_patch_spec.rb b/spec/initializers/carrierwave_patch_spec.rb index d577eca2ac7..c4a7bfa59c6 100644 --- a/spec/initializers/carrierwave_patch_spec.rb +++ b/spec/initializers/carrierwave_patch_spec.rb @@ -28,5 +28,17 @@ RSpec.describe 'CarrierWave::Storage::Fog::File' do expect(subject.authenticated_url).to eq("https://sa.blob.core.windows.net/test_container/test_blob?token") end end + + context 'with custom expire_at' do + it 'properly sets expires param' do + expire_at = 24.hours.from_now + + expect_next_instance_of(Fog::Storage::AzureRM::File) do |file| + expect(file).to receive(:url).with(expire_at).and_call_original + end + + expect(subject.authenticated_url(expire_at: expire_at)).to eq("https://sa.blob.core.windows.net/test_container/test_blob?token") + end + end end end |