+
+ context "with notify_update = true (default)" do
+ let :params do
+ default_params
+ end
+ it { is_expected.to contain_apt__setting("conf-#{title}").with_notify_update(true) }
+ end
+
+ context "with notify_update = false" do
+ let :params do
+ default_params.merge({
+ :notify_update => false
+ })
+ end
+ it { is_expected.to contain_apt__setting("conf-#{title}").with_notify_update(false) }
+ end
+ end
+
+ describe "when creating a preference without content" do
+ let :params do
+ {
+ :priority => '00',
+ }
+ end
+
+ it 'fails' do
+ expect { subject.call } .to raise_error(/pass in content/)
+ end