Skip to content

Commit

Permalink
Changes based on CR.
Browse files Browse the repository at this point in the history
  • Loading branch information
teclator committed Feb 12, 2020
1 parent e15aac1 commit 30ef6ce
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 8 deletions.
6 changes: 3 additions & 3 deletions src/lib/y2network/presenters/config_summary.rb
Original file line number Diff line number Diff line change
Expand Up @@ -43,17 +43,17 @@ def text

private

# Convenicente method to obtain the current config interfaces summary
# Convenience method to obtain the current config interfaces summary
def interfaces_summary
@interfaces_summary ||= Summary.for(config, "interfaces")
end

# Convenicente method to obtain the current config routing summary
# Convenience method to obtain the current config routing summary
def routing_summary
@routing_summary ||= Summary.for(config, "routing")
end

# Convenicente method to obtain the current config dns summary
# Convenience method to obtain the current config dns summary
def dns_summary
@dns_summary ||= Summary.for(config, "dns")
end
Expand Down
6 changes: 3 additions & 3 deletions test/y2network/presenters/dns_summary_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -86,23 +86,23 @@
end
end

context "when the config does not contains a system hostname" do
context "when the config does not contain a system hostname" do
let(:system_hostname) { "" }

it "does not show the hostname" do
expect(presenter.text).to_not include("Hostname")
end
end

context "when the config does not contains name servers" do
context "when the config does not contain name servers" do
let(:nameservers) { [] }

it "does not show the name servers" do
expect(presenter.text).to_not include("Name Servers")
end
end

context "when the config does not contains search domains" do
context "when the config does not contain search domains" do
let(:searchlist) { [] }

it "does not show the search domains" do
Expand Down
3 changes: 1 addition & 2 deletions test/y2network/presenters/proposal_summary_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -54,8 +54,7 @@

describe "#text" do
it "returns a summary in text form" do
text = presenter.text
expect(text).to be_a(::String)
expect(presenter.text).to be_a(::String)
end

it "returns a summary with the interfaces, dns and routing configuration" do
Expand Down

0 comments on commit 30ef6ce

Please sign in to comment.