From db41070abe964f75faee90eeaeb7b9d743e86785 Mon Sep 17 00:00:00 2001 From: Justin Lambert Date: Sat, 29 Dec 2012 15:47:29 -0700 Subject: added rspec tests, minor cleanup --- spec/classes/openvpn_init_spec.rb | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 spec/classes/openvpn_init_spec.rb (limited to 'spec/classes') diff --git a/spec/classes/openvpn_init_spec.rb b/spec/classes/openvpn_init_spec.rb new file mode 100644 index 0000000..cdfdea1 --- /dev/null +++ b/spec/classes/openvpn_init_spec.rb @@ -0,0 +1,20 @@ +require 'spec_helper' + +describe 'openvpn', :type => :class do + + let (:facts) { { :concat_basedir => '/var/lib/puppet/concat' } } + + it { should create_class('openvpn') } + it { should contain_class('concat::setup') } + it { should contain_package('openvpn') } + it { should contain_service('openvpn').with( + 'ensure' => 'running', + 'enable' => true + ) } + + it { should contain_file('/etc/openvpn').with('ensure' => 'directory') } + it { should contain_file('/etc/openvpn/keys').with('ensure' => 'directory') } + + it { should contain_concat__fragment('openvpn.default.header') } + +end -- cgit v1.2.3