diff options
-rw-r--r-- | spec/unit/provider/service/systemd_service_spec.rb | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/spec/unit/provider/service/systemd_service_spec.rb b/spec/unit/provider/service/systemd_service_spec.rb index 06614442fe..e0a94127b7 100644 --- a/spec/unit/provider/service/systemd_service_spec.rb +++ b/spec/unit/provider/service/systemd_service_spec.rb @@ -26,8 +26,8 @@ describe Chef::Provider::Service::Systemd do node.default["etc"] = Hash.new node.default["etc"]["passwd"] = { "joe" => { - "uid" => 10000 - } + "uid" => 10000, + }, } node } @@ -196,14 +196,14 @@ describe Chef::Provider::Service::Systemd do context "when a user is specified" do it "should call '#{systemctl_path} --user start service_name' if no start command is specified" do current_resource.user("joe") - expect(provider).to receive(:shell_out_with_systems_locale!).with("#{systemctl_path} --user start #{service_name}", {"environment"=>{"DBUS_SESSION_BUS_ADDRESS"=>"unix:path=/run/user/10000/bus"}, "user" => "joe"}).and_return(shell_out_success) + expect(provider).to receive(:shell_out_with_systems_locale!).with("#{systemctl_path} --user start #{service_name}", { "environment" => { "DBUS_SESSION_BUS_ADDRESS" => "unix:path=/run/user/10000/bus" }, "user" => "joe" }).and_return(shell_out_success) provider.start_service end it "should not call '#{systemctl_path} --user start service_name' if it is already running" do current_resource.running(true) current_resource.user("joe") - expect(provider).not_to receive(:shell_out_with_systems_locale!).with("#{systemctl_path} --user start #{service_name}", {"environment"=>{"DBUS_SESSION_BUS_ADDRESS"=>"unix:path=/run/user/10000/bus"}, "user" => "joe"}) + expect(provider).not_to receive(:shell_out_with_systems_locale!).with("#{systemctl_path} --user start #{service_name}", { "environment" => { "DBUS_SESSION_BUS_ADDRESS" => "unix:path=/run/user/10000/bus" }, "user" => "joe" }) provider.start_service end end |