Skip to content

Commit

Permalink
Add test for masked unit
Browse files Browse the repository at this point in the history
Signed-off-by: Simon Deziel <[email protected]>
  • Loading branch information
simondeziel committed Nov 6, 2021
1 parent 63499f5 commit aef7754
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions spec/defines/unit_file_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,16 @@
end
end

context 'enable => mask' do
let(:params) { { enable: 'mask' } }

it do
expect(subject).to create_file("/etc/systemd/system/#{title}").
with_ensure('link').
with_target('/dev/null')
end
end

context 'when using default values for enable and active' do
it {
expect(subject).to create_exec("#{title}-systemctl-daemon-reload").with(
Expand Down

0 comments on commit aef7754

Please sign in to comment.