Skip to content

Commit

Permalink
fixing rspec
Browse files Browse the repository at this point in the history
  • Loading branch information
Benedikt Braunger committed Sep 23, 2020
1 parent 12516bc commit 2e2e566
Showing 1 changed file with 8 additions and 18 deletions.
26 changes: 8 additions & 18 deletions spec/classes/storage_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
it { is_expected.to contain_class('bareos') }
end

context 'with autochangers => { test: { changer_command => "foo", changer_device => "/dev/foo", device => "dev01" }}}' do
context 'with autochangers => { test: { changer_command => "foo", changer_device => "/dev/foo", device => "dev01" }}, devices => { dev01: { archive_device => "/mnt/test", media_type => "file" }}}' do
let(:params) do
{
autochangers: {
Expand All @@ -14,23 +14,9 @@
changer_device: "/dev/foo",
device: "dev01",
}
}
}
end
it { is_expected.to compile }
it do
is_expected.to contain_bareos__storage__autochanger('test')
.with_changer_command('foo')
.with_changer_device('/dev/foo')
.with_device('dev01')
end
end

context 'with devices => { test: { archive_device => "/mnt/test", media_type => "file" }}}' do
let(:params) do
{
},
devices: {
test: {
dev01: {
archive_device: "/mnt/test",
media_type: "file",
}
Expand All @@ -39,7 +25,11 @@
end
it { is_expected.to compile }
it do
is_expected.to contain_bareos__storage__device('test')
is_expected.to contain_bareos__storage__autochanger('test')
.with_changer_command('foo')
.with_changer_device('/dev/foo')
.with_device('dev01')
is_expected.to contain_bareos__storage__device('dev01')
.with_archive_device('/mnt/test')
.with_media_type('file')
end
Expand Down

0 comments on commit 2e2e566

Please sign in to comment.