Last active
August 29, 2015 14:05
-
-
Save mvidner/433ed3c2644382853c29 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #! /usr/bin/rspec | |
| require_relative '../src/modules/IscsiLioData' | |
| describe Yast::IscsiLioDataClass do | |
| before :each do | |
| @iscsilib = Yast::IscsiLioDataClass.new | |
| @iscsilib.main() | |
| @test_class = @iscsilib | |
| end | |
| describe "#SetAuth" do | |
| context "when ..." do | |
| it "filters out sensitive data" do | |
| tgt = "" | |
| tpg = -42 | |
| clnt = "" | |
| inc = ["SECRET1"] | |
| out = ["SECRET2"] | |
| expect(Yast::Builtins).to receive(:y2milestone) do |*args| | |
| expect(args.to_s).not_to match /SECRET/ | |
| end.at_least(2).times | |
| expect(@iscsilib). | |
| to receive(:LogExecCmd). | |
| twice. | |
| and_return true | |
| expect(@iscsilib.SetAuth(tgt, tpg, clnt, inc, out)).to be true | |
| end | |
| end | |
| end | |
| end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment