Skip to content

Commit

Permalink
Update from code review
Browse files Browse the repository at this point in the history
Co-Authored-By: Ladislav Slezák <lslezak@suse.cz>
  • Loading branch information
dgdavid and lslezak committed Jun 20, 2019
1 parent 54ece5d commit 1c44030
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/lib/registration/addon.rb
Expand Up @@ -258,7 +258,7 @@ def accept_eula
#
# @return [Boolean] true if EULA acceptance was required but refused; false otherwise
def eula_refused?
eula_acceptance_needed? && !eula_accepted
eula_acceptance_needed? && !eula_accepted?
end

# Whether the EULA acceptance is required
Expand Down
4 changes: 2 additions & 2 deletions test/addon_spec.rb
Expand Up @@ -242,7 +242,7 @@

context "when EULA acceptance is required" do
before do
allow(addon).to receive(:eula_acceptance_needed?).and_return(false)
allow(addon).to receive(:eula_acceptance_needed?).and_return(true)
end

context "and the license was accepted" do
Expand All @@ -255,7 +255,7 @@

context "and the license was not accepted" do
it "returns true" do
expect(addon.eula_refused?).to eq(false)
expect(addon.eula_refused?).to eq(true)
end
end
end
Expand Down

0 comments on commit 1c44030

Please sign in to comment.