Commit 0c881e50 authored by Jamie Tanna's avatar Jamie Tanna

Fix: Use correct path to home directory

parent 2d221178
Pipeline #8517376 passed with stage
in 1 minute and 41 seconds
......@@ -28,7 +28,7 @@ user "create user #{node['user']}" do
end
file 'creates the hello.txt file' do
path "~#{node['user']}/hello.txt"
path "/home/#{node['user']}/hello.txt"
content "hello #{node['user']}"
mode '0600'
owner node['user']
......
......@@ -122,7 +122,7 @@ describe 'user-cookbook::default' do
it 'creates the hello.txt file' do
expect(chef_run).to create_file('creates the hello.txt file')
.with(path: '~jamie/hello.txt')
.with(path: '/home/jamie/hello.txt')
.with(content: 'hello jamie')
.with(mode: '0600')
.with(owner: 'jamie')
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment