Skip to content

Commit

Permalink
testcase
Browse files Browse the repository at this point in the history
  • Loading branch information
schubi2 committed Mar 9, 2020
1 parent e3dda1c commit e16d6b6
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions test/ntp_client_proposal_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,8 @@
allow(Yast::NtpClient).to receive(:config_has_been_read).and_return(config_was_read?)
allow(Yast::NtpClient).to receive(:ntp_selected).and_return(ntp_was_selected?)
allow(Yast::NtpClient).to receive(:GetUsedNtpServers)
.and_return(["2.opensuse.pool.ntp.org"])
.and_return(["de.pool.ntp.org"])
allow(subject).to receive(:select_ntp_server).and_return(true)
end

context "when NTP servers were found via DHCP" do
Expand Down Expand Up @@ -68,7 +69,7 @@
expect(Yast::UI).to receive(:ChangeWidget) do |*args|
items = args.last
hostnames = items.map { |i| i[1] }
expect(hostnames).to eq(["2.opensuse.pool.ntp.org"])
expect(hostnames).to eq(["de.pool.ntp.org"])
end
subject.MakeProposal
end
Expand All @@ -81,7 +82,7 @@
expect(Yast::UI).to receive(:ChangeWidget) do |*args|
items = args.last
hostnames = items.map { |i| i[1] }
expect(hostnames).to eq(["2.opensuse.pool.ntp.org"])
expect(hostnames).to eq(["de.pool.ntp.org"])
end
subject.MakeProposal
end
Expand Down

0 comments on commit e16d6b6

Please sign in to comment.