New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Disable unavailable extensions (bnc#883148) #113
Conversation
@@ -65,6 +65,7 @@ def create_addon_with_deps(root) | |||
# delegate methods to underlaying suse connect object | |||
def_delegators :@pure_addon, | |||
:arch, | |||
:available, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I see there two checks for false. It have impression that nil is in fact available. I found quite confusing to see that available = nil
in fact is available. I recommend to hide such logic into addon class like removing this delegator and instead have
def available?
# nil mean, that server do not report about availability, so we expect that all is available
!(@pure_addon.available == false)
end
and then later use intuitive things like unless available?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yes, good point...
expect(addon.selectable?).to be_false | ||
end | ||
|
||
it "returns true when the addon is available" do |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I miss case with it "returns true when addon availability is not set" do
to cover common case.
LGTM |
Disable unavailable extensions (bnc#883148)
No description provided.