Skip to content

Commit

Permalink
Add missing SystemService test
Browse files Browse the repository at this point in the history
  • Loading branch information
imobachgs committed Aug 2, 2018
1 parent 1ad03dd commit ae8c07b
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions library/systemd/test/yast2/system_service_test.rb
Expand Up @@ -1064,6 +1064,16 @@
expect(system_service.changed?).to eq(true)
end

context "when the change would not modify the underlying service" do
before do
allow(system_service).to receive(:currently_active?).and_return(false)
end

it "returns false" do
expect(system_service.changed?).to eq(false)
end
end

context "and ask for that specific change" do
it "returns true" do
expect(system_service.changed?(:active)).to eq(true)
Expand Down

0 comments on commit ae8c07b

Please sign in to comment.