Skip to content

Commit

Permalink
add test for cli show
Browse files Browse the repository at this point in the history
  • Loading branch information
jreidinger committed Jan 23, 2020
1 parent f82de4b commit 2956ac0
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
4 changes: 4 additions & 0 deletions test/spec_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,10 @@
SRC_PATH = File.expand_path("../src", __dir__)
ENV["Y2DIR"] = SRC_PATH

# localization agnostic tests
ENV["LC_ALL"] = "en_US.utf-8"
ENV["LANG"] = "en_US.utf-8"

require "yast"

# stub module to prevent its Import
Expand Down
6 changes: 6 additions & 0 deletions test/y2ftp/clients/ftp_server_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,8 @@
subject { described_class.new }

describe "#FTPdCMDShow" do
let(:anon_authen) { "0" }

before do
allow(Yast::FtpServer).to receive(:EDIT_SETTINGS).and_return("AnonAuthen" => anon_authen)

Expand Down Expand Up @@ -71,5 +73,9 @@
subject.FTPdCMDShow({})
end
end

it "returns true" do
expect(subject.FTPdCMDShow({})).to eq true
end
end
end

0 comments on commit 2956ac0

Please sign in to comment.