Sha256: ce8e94e26f734b028b8409f7da32952bef165da8e99d407a435a9cdcd87ec291

Contents?: true

Size: 998 Bytes

Versions: 5

Compression:

Stored size: 998 Bytes

Contents

require File.expand_path(File.join(File.dirname(__FILE__), '..', '..', '..', 'spec_helper.rb'))
require File.expand_path(File.join(File.dirname(__FILE__), '..', '..', '..', '..', 'lib', 'whiskey_disk', 'config'))
require File.expand_path(File.join(File.dirname(__FILE__), '..', '..', '..', '..', 'lib', 'whiskey_disk', 'config', 'filters', 'localize_domains_filter'))

describe 'setting empty domain entries to "local"' do
  before do
    @config = WhiskeyDisk::Config.new
    @filter = WhiskeyDisk::Config::LocalizeDomainsFilter.new(@config)
  end

  it 'handles empty domain filtering among roles across all projects and targets' do
    @data = {
      'domain' => [
        { 'name' => nil },
        { 'name' => '' },
        { 'name' => 'local' },
        { 'name' => 'x' }
      ]
    }
    
    @filter.filter(@data).should == {
      'domain' => [
        { 'name' => 'local' },
        { 'name' => 'local' },
        { 'name' => 'local' },
        { 'name' => 'x' }
      ]
    }
  end
end

Version data entries

5 entries across 5 versions & 3 rubygems

Version Path
ol-whisk_deploy-0.6.25 spec/whiskey_disk/config/filters/localize_domains_filter_spec.rb
ol-whisk_deploy-0.6.26 spec/whiskey_disk/config/filters/localize_domains_filter_spec.rb
whisk_deploy-0.6.26 spec/whiskey_disk/config/filters/localize_domains_filter_spec.rb
whiskey_disk-0.6.24 spec/whiskey_disk/config/filters/localize_domains_filter_spec.rb
whiskey_disk-0.6.23 spec/whiskey_disk/config/filters/localize_domains_filter_spec.rb