Skip to content

Commit

Permalink
Add a test case for bsc#1088183
Browse files Browse the repository at this point in the history
  • Loading branch information
imobachgs committed Apr 6, 2018
1 parent 2101d80 commit ac0d4a1
Showing 1 changed file with 19 additions and 1 deletion.
20 changes: 19 additions & 1 deletion test/users_auto_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@
end

describe "#AutoYaST" do

context "Import" do
before do
allow(Yast::WFM).to receive(:Args).with(no_args).and_return([func,users])
Expand All @@ -44,5 +43,24 @@
end
end
end

context "#Write" do
let(:func) { "Write" }

before do
allow(Yast::WFM).to receive(:Args).with(no_args).and_return([func])
allow(Yast::WFM).to receive(:Args).with(0).and_return(func)
end

context "when root user is not defined" do
before do
Yast::Users.Import({})
end

it "returns true" do
expect(subject.main).to eq(true)
end
end
end
end
end

0 comments on commit ac0d4a1

Please sign in to comment.