Skip to content

Commit

Permalink
Try to download release notes during InstRepositoriesInitialization
Browse files Browse the repository at this point in the history
  • Loading branch information
imobachgs committed Sep 15, 2017
1 parent 5f4f9df commit 6bd2108
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 0 deletions.
Expand Up @@ -52,6 +52,7 @@ def main
end

adjust_base_product_selection
Yast::WFM.CallFunction("inst_download_release_notes") if products.size == 1
:next
end

Expand Down
15 changes: 15 additions & 0 deletions test/lib/clients/inst_repositories_initialization_test.rb
Expand Up @@ -48,16 +48,31 @@
expect(prod1).to_not receive(:restore)
client.main
end

it "downloads release notes" do
expect(Yast::WFM).to receive(:CallFunction).with("inst_download_release_notes")
client.main
end
end

context "when more than one product is available" do
let(:products) { [prod1, prod2] }

before do
allow(prod1).to receive(:restore)
allow(prod2).to receive(:restore)
end

it "unselects all products" do
expect(prod1).to receive(:restore)
expect(prod2).to receive(:restore)
client.main
end

it "does not download release notes" do
expect(Yast::WFM).to_not receive(:CallFunction).with("inst_download_release_notes")
client.main
end
end

context "when no products are found" do
Expand Down

0 comments on commit 6bd2108

Please sign in to comment.