add specs for host behaviour
Alexander Merkulov
committed Feb 03, 2017
commit 46fcdd8493da010a16f6c9315852c7d1b19ef599
Showing 1
changed file with
15 additions
and 0 deletions
spec/unit/services/asset_host_service_spec.rb
+15
-0
| @@ | @@ -53,6 +53,21 @@ describe Locomotive::Steam::AssetHostService do |
| end | |
| + | describe 'the host with prefix' do |
| + | |
| + | let(:host) { 'http://somewhere.net/other/' } |
| + | let(:source) { '/sites/42/assets/1/banner.png' } |
| + | it { is_expected.to eq 'http://somewhere.net/other/sites/42/assets/1/banner.png' } |
| + | |
| + | describe 'also with https' do |
| + | |
| + | let(:host) { 'https://somewhere.net/other/' } |
| + | it { is_expected.to eq 'https://somewhere.net/other/sites/42/assets/1/banner.png' } |
| + | |
| + | end |
| + | |
| + | end |
| + | |
| describe 'the host is a string' do | |
| let(:host) { 'http://assets.locomotivecms.com' } | |