Skip to content

Commit

Permalink
add spec for login_defs
Browse files Browse the repository at this point in the history
  • Loading branch information
bkw committed Nov 28, 2014
1 parent 33d8717 commit 00bd5c5
Showing 1 changed file with 32 additions and 0 deletions.
32 changes: 32 additions & 0 deletions spec/recipes/login_defs_spec.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
# encoding: UTF-8
#
# Copyright 2014, Deutsche Telekom AG
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#

require_relative '../spec_helper'

describe 'os-hardening::login_defs' do

let(:chef_run) do
ChefSpec::ServerRunner.new.converge(described_recipe)
end

it 'creates /etc/login.defs' do
expect(chef_run).to create_template('/etc/login.defs')
.with(mode: '0444')
.with(owner: 'root')
.with(group: 'root')
end
end

0 comments on commit 00bd5c5

Please sign in to comment.