diff options
author | Sean McGivern <sean@mcgivern.me.uk> | 2018-02-14 12:53:37 +0300 |
---|---|---|
committer | Kamil TrzciĆski <ayufan@ayufan.eu> | 2018-02-28 23:26:34 +0300 |
commit | d4a282751d6161c34403a5b34e569ebddbf5a0ca (patch) | |
tree | ed5338a21693c24f798144ce582a26d3ba43104e /spec/initializers/fog_google_https_private_urls_spec.rb | |
parent | 79a5e7fb539dc6df7de590efb69fb9ab9d4614eb (diff) |
Merge branch '4879-support-private-https-urls-for-object-storage' into 'master'
Resolve ""Support private HTTPS urls for object storage""
Closes #4879
See merge request gitlab-org/gitlab-ee!4475
Diffstat (limited to 'spec/initializers/fog_google_https_private_urls_spec.rb')
-rw-r--r-- | spec/initializers/fog_google_https_private_urls_spec.rb | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/spec/initializers/fog_google_https_private_urls_spec.rb b/spec/initializers/fog_google_https_private_urls_spec.rb new file mode 100644 index 00000000000..de3c157ab7b --- /dev/null +++ b/spec/initializers/fog_google_https_private_urls_spec.rb @@ -0,0 +1,24 @@ +require 'spec_helper' + +describe 'Fog::Storage::GoogleXML::File' do + let(:storage) do + Fog.mock! + Fog::Storage.new({ + google_storage_access_key_id: "asdf", + google_storage_secret_access_key: "asdf", + provider: "Google" + }) + end + + let(:file) do + directory = storage.directories.create(key: 'data') + directory.files.create( + body: 'Hello World!', + key: 'hello_world.txt' + ) + end + + it 'delegates to #get_https_url' do + expect(file.url(Time.now)).to start_with("https://") + end +end |