Skip to content

Commit 8369567

Browse files
author
Alexandros Afentoulis
committed
stub: add spec for stub-first stub zone option
Add a spec test for the newly introduced stub-first option.
1 parent fbebe5f commit 8369567

File tree

1 file changed

+23
-0
lines changed

1 file changed

+23
-0
lines changed

spec/defines/stub_spec.rb

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,29 @@
7777
}
7878
end
7979

80+
context 'with stub_first set' do
81+
let(:params) do
82+
{
83+
address: ['::1'],
84+
stub_first: true
85+
}
86+
end
87+
88+
it { is_expected.to compile.with_all_deps }
89+
it { is_expected.to contain_unbound__stub('lab.example.com') }
90+
91+
it {
92+
expect(subject).to contain_concat__fragment('unbound-stub-lab.example.com').with(
93+
content: <<~ZONE
94+
stub-zone:
95+
name: "lab.example.com"
96+
stub-addr: ::1
97+
stub-first: yes
98+
ZONE
99+
)
100+
}
101+
end
102+
80103
context 'with address set as string' do
81104
let(:params) do
82105
{

0 commit comments

Comments
 (0)