require 'spec_helper'

describe 'collectd::plugin::network', type: :class do
  let :facts do
    {
      osfamily: 'RedHat',
      collectd_version: '4.8.0'
    }
  end
  context ':ensure => present, default params' do
    let :facts do
      {
        osfamily: 'RedHat',
        collectd_version: '4.8.0'
      }
    end

    it 'Will create /etc/collectd.d/10-network.conf' do
      should contain_file('network.load').
        with(ensure: 'present',
             path: '/etc/collectd.d/10-network.conf',
             content: %r{# Generated by Puppet\nLoadPlugin network\n\n<Plugin network>\n  \n</Plugin>\n})
    end
  end
end
