|
|
|
@ -420,10 +420,12 @@ module Carto
|
|
|
|
|
@template_hash[:layergroup][:layers].first[:options][:source].should be_nil
|
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
describe 'when tms' do
|
|
|
|
|
describe 'when basemap options' do
|
|
|
|
|
before(:all) do
|
|
|
|
|
@tms_layer = @visualization.layers.first
|
|
|
|
|
@tms_layer.options[:tms] = true
|
|
|
|
|
@tms_layer.options[:urlTemplate] = 'http://url_template_example'
|
|
|
|
|
@tms_layer.options[:subdomains] = 'subdomains_example'
|
|
|
|
|
|
|
|
|
|
@tms_layer.save
|
|
|
|
|
@visualization.reload
|
|
|
|
@ -434,6 +436,8 @@ module Carto
|
|
|
|
|
after(:all) do
|
|
|
|
|
@tms_layer = @visualization.layers.first
|
|
|
|
|
@tms_layer.options[:tms] = nil
|
|
|
|
|
@tms_layer.options[:urlTemplate] = nil
|
|
|
|
|
@tms_layer.options[:subdomains] = nil
|
|
|
|
|
|
|
|
|
|
@tms_layer.save
|
|
|
|
|
@visualization.reload
|
|
|
|
@ -442,7 +446,15 @@ module Carto
|
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
it 'should have tms options' do
|
|
|
|
|
@tms_layer_hash[:options][:tms].should_not be_nil
|
|
|
|
|
@tms_layer_hash[:options][:tms].should be_true
|
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
it 'should have urlTemplate options' do
|
|
|
|
|
@tms_layer_hash[:options][:urlTemplate].should eq 'http://url_template_example'
|
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
it 'should have subdomains options' do
|
|
|
|
|
@tms_layer_hash[:options][:subdomains].should eq 'subdomains_example'
|
|
|
|
|
end
|
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|