Skip to content

Commit

Permalink
Updates from code review
Browse files Browse the repository at this point in the history
  • Loading branch information
imobachgs committed May 27, 2016
1 parent 6b95636 commit df4d979
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 10 deletions.
5 changes: 3 additions & 2 deletions src/lib/installation/clients/ssh_import_auto.rb
Expand Up @@ -55,7 +55,7 @@ def import(data)
def summary
message =
if ssh_importer.configurations.empty?
_("No previous Linux installation found - not importing any SSH Key")
_("No previous Linux installation found")
elsif ssh_importer.device.nil?
_("No existing SSH host keys will be copied")
else
Expand All @@ -70,7 +70,8 @@ def summary
_("SSH host keys will be copied from %s") % name
end
end
"<UL>#{message}</UL>"
# FIXME: we should use the Summary module.
"<UL><LI>#{message}</LI></UL>"
end

def modified?
Expand Down
13 changes: 5 additions & 8 deletions test/ssh_import_auto_test.rb
Expand Up @@ -38,13 +38,10 @@

context "when no previous configurations were found" do
let(:config) { "root3" }
let(:message) do
_("No previous Linux installation found - " \
"not importing any SSH Key")
end
let(:message) { _("No previous Linux installation found") }

it "returns 'No previous Linux...' message" do
expect(subject.run).to eq("<UL>#{message}</UL>")
expect(subject.run).to eq("<UL><LI>#{message}</LI></UL>")
end
end

Expand All @@ -54,7 +51,7 @@
let(:message) { _("No existing SSH host keys will be copied") }

it "returns 'No existing SSH...'" do
expect(subject.run).to eq("<UL>#{message}</UL>")
expect(subject.run).to eq("<UL><LI>#{message}</LI></UL>")
end
end

Expand All @@ -67,7 +64,7 @@
end

it "returns 'No existing SSH...'" do
expect(subject.run).to eq("<UL>#{message}</UL>")
expect(subject.run).to eq("<UL><LI>#{message}</LI></UL>")
end
end

Expand All @@ -80,7 +77,7 @@
end

it "returns 'No existing SSH...'" do
expect(subject.run).to eq("<UL>#{message}</UL>")
expect(subject.run).to eq("<UL><LI>#{message}</LI></UL>")
end
end
end
Expand Down

0 comments on commit df4d979

Please sign in to comment.