Skip to content

Commit

Permalink
Fixes #15537 - Allow package names as an array (#414)
Browse files Browse the repository at this point in the history
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
akofink committed Jul 29, 2016
1 parent 610fae6 commit 6dce9a7
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 1 deletion.
2 changes: 1 addition & 1 deletion test/data/3.0/foreman_api.json

Large diffs are not rendered by default.

20 changes: 20 additions & 0 deletions test/functional/filter_rule/create_test.rb
@@ -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

0 comments on commit 6dce9a7

Please sign in to comment.