Skip to content

Commit 8569a61

Browse files
committed
os_version_gte: fix and add tests
As reported in <#972 (comment)>, os_version_gte is not returning correct results. This commit fixes the tests to demonstrate correct expected behavior.
1 parent cc1fdcf commit 8569a61

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

spec/functions/os_version_gte_spec.rb

+5-3
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,10 @@
1111
}
1212
end
1313

14+
it { is_expected.to run.with_params('Debian', '10').and_return(false) }
1415
it { is_expected.to run.with_params('Debian', '9').and_return(true) }
15-
it { is_expected.to run.with_params('Debian', '8').and_return(false) }
16-
it { is_expected.to run.with_params('Debian', '8.0').and_return(false) }
16+
it { is_expected.to run.with_params('Debian', '8').and_return(true) }
17+
it { is_expected.to run.with_params('Debian', '8.0').and_return(true) }
1718
it { is_expected.to run.with_params('Ubuntu', '16.04').and_return(false) }
1819
it { is_expected.to run.with_params('Fedora', '29').and_return(false) }
1920
end
@@ -27,7 +28,8 @@
2728
end
2829

2930
it { is_expected.to run.with_params('Debian', '9').and_return(false) }
30-
it { is_expected.to run.with_params('Ubuntu', '16').and_return(false) }
31+
it { is_expected.to run.with_params('Ubuntu', '16').and_return(true) }
32+
it { is_expected.to run.with_params('Ubuntu', '14.04').and_return(true) }
3133
it { is_expected.to run.with_params('Ubuntu', '16.04').and_return(true) }
3234
it { is_expected.to run.with_params('Ubuntu', '18.04').and_return(true) }
3335
it { is_expected.to run.with_params('Fedora', '29').and_return(false) }

0 commit comments

Comments
 (0)