Sha256: f2be82fe748bb510d2edd0e44170238e06887033635e4e22e21037683e9a12e9

Contents?: true

Size: 834 Bytes

Versions: 316

Compression:

Stored size: 834 Bytes

Contents

require 'spec_helper'
require 'puppet/settings/server_list_setting'

describe Puppet::Settings::ServerListSetting do

    it "prints strings as strings" do
      settings = Puppet::Settings.new
      settings.define_settings(:main, neptune: {type: :server_list, desc: 'list of servers'})
      server_list_setting = settings.setting(:neptune)
      expect(server_list_setting.print("jupiter,mars")).to eq("jupiter,mars")
    end

    it "prints arrays as strings" do
      settings = Puppet::Settings.new
      settings.define_settings(:main, neptune: {type: :server_list, desc: 'list of servers'})
      server_list_setting = settings.setting(:neptune)
      expect(server_list_setting.print([["main", 1234],["production", 8140]])).to eq("main:1234,production:8140")
      expect(server_list_setting.print([])).to eq("")
    end

end

Version data entries

316 entries across 316 versions & 1 rubygems

Version Path
puppet-6.0.10 spec/unit/settings/server_list_setting_spec.rb
puppet-6.0.10-x86-mingw32 spec/unit/settings/server_list_setting_spec.rb
puppet-6.0.10-x64-mingw32 spec/unit/settings/server_list_setting_spec.rb
puppet-6.0.10-universal-darwin spec/unit/settings/server_list_setting_spec.rb
puppet-5.5.16 spec/unit/settings/server_list_setting_spec.rb
puppet-5.5.16-x86-mingw32 spec/unit/settings/server_list_setting_spec.rb
puppet-5.5.16-x64-mingw32 spec/unit/settings/server_list_setting_spec.rb
puppet-5.5.16-universal-darwin spec/unit/settings/server_list_setting_spec.rb
puppet-6.6.0 spec/unit/settings/server_list_setting_spec.rb
puppet-6.6.0-x86-mingw32 spec/unit/settings/server_list_setting_spec.rb
puppet-6.6.0-x64-mingw32 spec/unit/settings/server_list_setting_spec.rb
puppet-6.6.0-universal-darwin spec/unit/settings/server_list_setting_spec.rb
puppet-6.5.0 spec/unit/settings/server_list_setting_spec.rb
puppet-6.5.0-x86-mingw32 spec/unit/settings/server_list_setting_spec.rb
puppet-6.5.0-x64-mingw32 spec/unit/settings/server_list_setting_spec.rb
puppet-6.5.0-universal-darwin spec/unit/settings/server_list_setting_spec.rb