summaryrefslogtreecommitdiff
path: root/spec/initializers
diff options
context:
space:
mode:
authorSean McGivern <sean@mcgivern.me.uk>2018-02-14 09:53:37 +0000
committerKamil TrzciƄski <ayufan@ayufan.eu>2018-02-28 21:26:34 +0100
commitd4a282751d6161c34403a5b34e569ebddbf5a0ca (patch)
treeed5338a21693c24f798144ce582a26d3ba43104e /spec/initializers
parent79a5e7fb539dc6df7de590efb69fb9ab9d4614eb (diff)
downloadgitlab-ce-d4a282751d6161c34403a5b34e569ebddbf5a0ca.tar.gz
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')
-rw-r--r--spec/initializers/fog_google_https_private_urls_spec.rb24
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