Skip to content

Commit

Permalink
rspec fix
Browse files Browse the repository at this point in the history
  • Loading branch information
nehalrp committed Jan 16, 2020
1 parent 82e9433 commit 8e1c1f8
Showing 1 changed file with 27 additions and 11 deletions.
38 changes: 27 additions & 11 deletions spec/classes/epel_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -207,17 +207,33 @@
)
end

it { is_expected.not_to contain_yumrepo('epel-testing') }
it { is_expected.not_to contain_yumrepo('epel-testing-debuginfo') }
it { is_expected.not_to contain_yumrepo('epel-testing-source') }
it { is_expected.not_to contain_yumrepo('epel-debuginfo') }
it { is_expected.not_to contain_yumrepo('epel-source') }

it do
is_expected.to contain_yumrepo('epel').with(
enabled: '1',
gpgcheck: '1'
)
it_behaves_like :base_7
it_behaves_like :gpgkey_7
it_behaves_like :epel_source_7
it_behaves_like :epel_debuginfo_7
it_behaves_like :epel_testing_7
it_behaves_like :epel_testing_source_7
it_behaves_like :epel_testing_debuginfo_7

context 'epel_baseurl => https://example.com/epel/7/x86_64' do
let(:params) do
{
epel_baseurl: 'https://example.com/epel/7/x86_64'
}
end

it { is_expected.to contain_yumrepo('epel').with(baseurl: 'https://example.com/epel/7/x86_64') }
it { is_expected.to contain_yumrepo('epel').with(mirrorlist: 'absent') }
end

context 'epel_mirrorlist => absent' do
let(:params) do
{
epel_mirrorlist: 'absent'
}
end

it { is_expected.to contain_yumrepo('epel').with(mirrorlist: 'absent') }
end
end
end

0 comments on commit 8e1c1f8

Please sign in to comment.