Skip to content

Commit

Permalink
test for correct call of LogExecCmd
Browse files Browse the repository at this point in the history
  • Loading branch information
gabi2 committed Sep 1, 2014
1 parent a3ec0d9 commit 2b6b777
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions test/SetAuth_spec.rb
Expand Up @@ -31,4 +31,24 @@
end
end
end

describe "#SetAuth" do
context "when called with user and password info" do
it "calls LogExecCmd correctly" do
tgt = ""
tpg = -42
clnt = ""
inc = ["User", "Password"]
out = []

expect(@iscsilib).to receive(:LogExecCmd) do |*args|
expect(args).to eq ["lio_node --setchapdiscauth User Password", {:do_log=>false}]
end

@iscsilib.SetAuth(tgt, tpg, clnt, inc, out)
end
end
end


end

0 comments on commit 2b6b777

Please sign in to comment.