service(systemd): launch_only_once test

This commit is contained in:
NickHackman 2022-02-11 14:48:05 -06:00 committed by Nick Hackman
parent 12bf07a6ba
commit 53d37cc84c

View File

@ -291,10 +291,11 @@ describe Homebrew::Service do
expect(unit).to eq(unit_expect.strip)
end
it "returns valid partial unit" do
it "returns valid partial oneshot unit" do
f.class.service do
run opt_bin/"beanstalkd"
run_type :immediate
launch_only_once true
end
unit = f.service.to_systemd_unit
@ -306,10 +307,10 @@ describe Homebrew::Service do
WantedBy=multi-user.target
[Service]
Type=simple
Type=oneshot
ExecStart=#{HOMEBREW_PREFIX}/opt/#{name}/bin/beanstalkd
EOS
expect(unit).to eq(unit_expect)
expect(unit).to eq(unit_expect.strip)
end
end