Skip to content

Commit

Permalink
Fixed tests
Browse files Browse the repository at this point in the history
  • Loading branch information
lslezak committed Sep 14, 2018
1 parent 18d22c3 commit 6ae05a8
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
3 changes: 2 additions & 1 deletion library/control/src/modules/WorkflowManager.rb
Original file line number Diff line number Diff line change
Expand Up @@ -1497,7 +1497,8 @@ def merge_product_workflow(product)
Yast::WorkflowManager.RemoveWorkflow(
:package,
merged_base_product.installation_package_repo,
merged_base_product.installation_package)
merged_base_product.installation_package
)
end

AddWorkflow(:package, product.installation_package_repo, product.installation_package)
Expand Down
7 changes: 4 additions & 3 deletions library/control/test/workflow_manager_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -437,7 +437,8 @@

describe "#merge_product_workflow" do
let(:product) do
instance_double("Y2Packager::Product", label: "SLES", installation_package: "package")
instance_double("Y2Packager::Product", label: "SLES", installation_package: "package",
installation_package_repo: 42)
end

before do
Expand All @@ -448,7 +449,7 @@
end

it "merges installation package workflow" do
expect(subject).to receive(:AddWorkflow).with(:package, 0, "package")
expect(subject).to receive(:AddWorkflow).with(:package, product.installation_package_repo, "package")
subject.merge_product_workflow(product)
end

Expand All @@ -458,7 +459,7 @@
end

it "removes the previous workflow" do
expect(subject).to receive(:RemoveWorkflow).with(:package, 0, "package")
expect(subject).to receive(:RemoveWorkflow).with(:package, product.installation_package_repo, "package")
subject.merge_product_workflow(product)
end
end
Expand Down

0 comments on commit 6ae05a8

Please sign in to comment.