forked from voxpupuli/puppet-php
-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix facts usage when selecting repo class
This fixes a bug introduced in voxpupuli#357 where Debian repositories were being selected on Ubuntu.
- Loading branch information
Showing
2 changed files
with
29 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
require 'spec_helper' | ||
|
||
describe 'php::repo', type: :class do | ||
on_supported_os.each do |os, facts| | ||
context "on #{os}" do | ||
let :facts do | ||
facts | ||
end | ||
|
||
describe 'when configuring a package repo' do | ||
case facts[:osfamily] | ||
when 'Debian' | ||
case facts[:operatingsystem] | ||
when 'Debian' | ||
it { is_expected.to contain_class('php::repo::debian') } | ||
when 'Ubuntu' | ||
it { is_expected.to contain_class('php::repo::ubuntu') } | ||
end | ||
when 'Suse' | ||
it { is_expected.to contain_class('php::repo::suse') } | ||
when 'RedHat' | ||
it { is_expected.to contain_class('php::repo::redhat') } | ||
end | ||
end | ||
|
||
end | ||
end | ||
end |