summaryrefslogtreecommitdiff
path: root/spec/unit/provider/service
diff options
context:
space:
mode:
authorJoshua Miller <joshuamiller01@gmail.com>2016-08-26 09:54:38 -0700
committerPhil Dibowitz <phil@ipom.com>2016-08-26 09:54:38 -0700
commit3f33d7a105801c31ae7a38334e582068ea94af2b (patch)
tree1711b52a9189401bcebb0de4d19235c245d0d41d /spec/unit/provider/service
parentbf7c0f9a698616da9c68adf6c0ca81f27456dc9d (diff)
downloadchef-3f33d7a105801c31ae7a38334e582068ea94af2b.tar.gz
Use symbols instead of strings as keys for systemd user property (#5241)
* Use symbols instead of strings as keys for systemd user property related funcs * Fix tests for provider/service/systemd for when user property is set * Change hash in systemctl_opts to use symbols instead of strings * Fix tests for chef/provider/systemd_unit.rb
Diffstat (limited to 'spec/unit/provider/service')
-rw-r--r--spec/unit/provider/service/systemd_service_spec.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/spec/unit/provider/service/systemd_service_spec.rb b/spec/unit/provider/service/systemd_service_spec.rb
index 8574cbf772..4e25f499f6 100644
--- a/spec/unit/provider/service/systemd_service_spec.rb
+++ b/spec/unit/provider/service/systemd_service_spec.rb
@@ -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