Skip to content

Commit

Permalink
Use PrdMarkLicenseNotConfirmed instead of PrdMarkLicenseUnconfirmed
Browse files Browse the repository at this point in the history
  • Loading branch information
imobachgs committed Aug 23, 2017
1 parent 67b106d commit 949eb77
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 7 deletions.
5 changes: 3 additions & 2 deletions package/yast2-packager.spec
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,9 @@ BuildRequires: yast2 >= 3.2.7
BuildRequires: yast2_theme

# Pkg::PrdGetLicenseToConfirm Pkg::PrdMarkLicenseConfirmed
# Pkg::PrdNeedToAcceptLicense Pkg::PrdHasLicenseConfirmed
BuildRequires: yast2-pkg-bindings >= 3.3.1
# Pkg::PrdMarkLicenseNotConfirmed Pkg::PrdHasLicenseConfirmed
# Pkg::PrdNeedToAcceptLicense
BuildRequires: yast2-pkg-bindings >= 3.3.2

# Augeas lenses
BuildRequires: augeas-lenses
Expand Down
2 changes: 1 addition & 1 deletion src/lib/y2packager/product.rb
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,7 @@ def license_confirmation=(confirmed)
if confirmed
Yast::Pkg.PrdMarkLicenseConfirmed(name)
else
Yast::Pkg.PrdMarkLicenseUnconfirmed(name)
Yast::Pkg.PrdMarkLicenseNotConfirmed(name)
end
end

Expand Down
4 changes: 2 additions & 2 deletions test/lib/dialogs/inst_product_license_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@
end
end

context "when the user unconfirms a previously confirmed license" do
context "when the user set as unconfirmed a previously confirmed license" do
let(:confirmed?) { true }

before do
Expand Down Expand Up @@ -115,7 +115,7 @@
allow(Yast::UI).to receive(:UserInput).and_return(:license_confirmation, button)
end

it "unconfirms the license" do
it "set as unconfirmed a license" do
expect(product).to receive(:license_confirmation=).with(false)
dialog.run
end
Expand Down
4 changes: 2 additions & 2 deletions test/product_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -237,8 +237,8 @@
end

context "when 'false' is given" do
it "unconfirms the license" do
expect(Yast::Pkg).to receive(:PrdMarkLicenseUnconfirmed).with(product.name)
it "sets as unconfirmed the license" do
expect(Yast::Pkg).to receive(:PrdMarkLicenseNotConfirmed).with(product.name)
product.license_confirmation = false
end
end
Expand Down

0 comments on commit 949eb77

Please sign in to comment.