File tree Expand file tree Collapse file tree 1 file changed +16
-4
lines changed
Expand file tree Collapse file tree 1 file changed +16
-4
lines changed Original file line number Diff line number Diff line change 66 on_supported_os . each do |os , os_facts |
77 context "on #{ os } " do
88 file_uri = 'puppet:///modules/test_module/licenses/test-license'
9+ test_content = 'test-license-content'
910 let ( :facts ) { os_facts }
10- let ( :params ) { { source : file_uri } }
1111
12- it { is_expected . to compile }
13- it { is_expected . to contain_class ( 'zend_common::license' ) . with_source ( file_uri ) }
1412
15- describe 'creates license file' do
13+ describe 'without params' do
14+ it { is_expected . to compile . and_raise_error ( /.*/ ) }
15+ end
16+
17+ describe 'with Puppet URL for source' do
18+ let ( :params ) { { source : file_uri } }
19+ it { is_expected . to compile }
20+ it { is_expected . to contain_class ( 'zend_common::license' ) . with_source ( file_uri ) }
1621 it { is_expected . to contain_file ( '/opt/zend/zendphp/etc/license' ) . with_source ( file_uri ) }
1722 end
23+
24+ describe 'with text for content' do
25+ let ( :params ) { { content : test_content } }
26+ it { is_expected . to compile }
27+ it { is_expected . to contain_class ( 'zend_common::license' ) . with_content ( test_content ) }
28+ it { is_expected . to contain_file ( '/opt/zend/zendphp/etc/license' ) . with_content ( test_content ) }
29+ end
1830 end
1931 end
2032end
You can’t perform that action at this time.
0 commit comments