Skip to content

Commit

Permalink
Adds test for commit c388fed
Browse files Browse the repository at this point in the history
  • Loading branch information
carmstrong committed Feb 28, 2014
1 parent abcf8a6 commit df59962
Showing 1 changed file with 30 additions and 0 deletions.
30 changes: 30 additions & 0 deletions spec/openjdk_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -117,4 +117,34 @@
end

end

describe 'default-java' do
context 'ubuntu' do
let(:chef_run) do
ChefSpec::Runner.new(
:platform => 'ubuntu',
:version => '12.04'
).converge(described_recipe)
end

it 'symlinks /usr/lib/jvm/default-java' do
link = chef_run.link('/usr/lib/jvm/default-java')
expect(link).to link_to(chef_run.node['java']['java_home'])
end
end

context 'centos' do
let(:chef_run) do
ChefSpec::Runner.new(
:platform => 'centos',
:version => '6.4'
).converge(described_recipe)
end

it 'does not symlink /usr/lib/jvm/default-java' do
link = chef_run.link('/usr/lib/jvm/default-java')
expect(link).not_to link_to(chef_run.node['java']['java_home'])
end
end
end
end

0 comments on commit df59962

Please sign in to comment.