Skip to content

Commit

Permalink
Happy rubocop
Browse files Browse the repository at this point in the history
  • Loading branch information
mchf committed Feb 18, 2020
1 parent f87d834 commit e6255bc
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 7 deletions.
5 changes: 2 additions & 3 deletions src/include/network/services/dns.rb
Original file line number Diff line number Diff line change
Expand Up @@ -57,8 +57,7 @@ def initialize_network_services_dns(include_target)
# are lists and their widgets are suffixed.
@hn_settings = {}

# TODO:
# It would be nice to display also transient hostname here - e.g. that
# TODO: It would be nice to display also transient hostname here - e.g. that
# one received from dhcp
@widget_descr_dns = {
"HOSTNAME" => {
Expand Down Expand Up @@ -436,7 +435,7 @@ def ValidateHostname(key, _event)

# 1) empty hostname is allowed - /etc/hostname gets cleared in such case
# 2) FQDN is allowed
value.empty? || Hostname.Check(value.tr('.',''))
value.empty? || Hostname.Check(value.tr(".", ""))
end

# Validator for the search list
Expand Down
8 changes: 4 additions & 4 deletions test/y2network/hostname_writer_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -27,17 +27,17 @@
let(:hostname_container) do
instance_double(
Y2Network::Hostname,
static: hostname,
dhcp_hostname: false,
static: hostname,
dhcp_hostname: false,
save_hostname?: true
)
end

let(:old_hostname_container) do
instance_double(
Y2Network::Hostname,
static: "oldhostname",
dhcp_hostname: false,
static: "old#{hostname}",
dhcp_hostname: false,
save_hostname?: true
)
end
Expand Down

0 comments on commit e6255bc

Please sign in to comment.