Skip to content

Commit

Permalink
[chef#946+chef#954] Add missing tests
Browse files Browse the repository at this point in the history
chef#959 fixed this, but the regression tests were missing

Signed-off-by: David Crosby <dcrosby@fb.com>
  • Loading branch information
dafyddcrosby committed Jun 14, 2024
1 parent 64410f1 commit 1382878
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions spec/rubocop/cop/chef/modernize/cron_d_file_or_template_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,24 @@
RUBY
end

# https://github.com/chef/cookstyle/issues/946
it 'does not register an offense when path is /etc/cron.deny' do
expect_no_offenses(<<~RUBY)
file '/etc/cron.deny' do
action :delete
end
RUBY
end

# https://github.com/chef/cookstyle/issues/954
it 'does not register an offense when path is /etc/cron.daily/foo' do
expect_no_offenses(<<~RUBY)
file '/etc/cron.daily/foo' do
action :delete
end
RUBY
end

it 'does not register an offense when the resource name is a variable or method' do
expect_no_offenses(<<~RUBY)
template foo do
Expand Down

0 comments on commit 1382878

Please sign in to comment.