Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fixes #15537 - Allow package names as an array (#414)
This change allows users to specify package or package group names in a comma-separated list when creating a content view filter rule rather than one package at a time.
- Loading branch information
Showing
2 changed files
with
21 additions
and
1 deletion.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
require_relative '../test_helper' | ||
require 'hammer_cli_katello/filter_rule' | ||
|
||
module HammerCLIKatello | ||
describe FilterRule::CreateCommand do | ||
it 'allows minimal options' do | ||
api_expects(:content_view_filter_rules, :create) do |p| | ||
p['content_view_filter_id'] == 1 && p['name'] == 'rpm1' | ||
end | ||
run_cmd(%w(content-view filter rule create --content-view-filter-id 1 --name rpm1)) | ||
end | ||
|
||
it 'allows multiple package names' do | ||
api_expects(:content_view_filter_rules, :create) do |p| | ||
p['content_view_filter_id'] == 1 && p['names'] == %w(rpm1 rpm2) | ||
end | ||
run_cmd(%w(content-view filter rule create --content-view-filter-id 1 --names rpm1,rpm2)) | ||
end | ||
end | ||
end |