gitlab-org--gitlab-foss/spec/initializers/fog_google_https_private_urls_spec.rb
Sean McGivern d4a282751d 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
2018-02-28 21:26:34 +01:00

24 lines
597 B
Ruby

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