Skip to content

Commit

Permalink
add spec tests
Browse files Browse the repository at this point in the history
  • Loading branch information
trefzer committed Mar 11, 2024
1 parent 60d990c commit 4365b12
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions spec/defines/instance_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,22 @@ class { 'redis':

it { is_expected.to contain_service('redis-server-app2.service').with_ensure(true).with_enable(true) }
end

context 'with custom options' do
let(:title) { 'default' }
let :params do {

Check failure on line 55 in spec/defines/instance_spec.rb

View workflow job for this annotation

GitHub Actions / Puppet / Static validations

Layout/MultilineBlockLayout: Block body expression is on the same line as the block start.
config_file_orig: '/tmp/myorig.conf',
custom_options: { 'myoption' => 'avalue', 'anotheroption' => 'anothervalue' },
}
end

it {
is_expected.to contain_file('/tmp/myorig.conf').
with_content(%r{^bind 127.0.0.1}).
with_content(%r{^myoption avalue}).
with_content(%r{^anotheroption anothervalue})
}
end
end
end
end

0 comments on commit 4365b12

Please sign in to comment.