Sha256: a771487d418a9cd520fa36ca629ab0d5d8b65d8f2933f80c4a8fa3664f107cd7
Contents?: true
Size: 1.46 KB
Versions: 12
Compression:
Stored size: 1.46 KB
Contents
require File.join(File.dirname(__FILE__), 'test_helper') require 'hammer_cli_foreman_openscap/scap_content' describe HammerCLIForemanOpenscap::ScapContent do include CommandTestHelper context "ListCommand" do let(:cmd) { HammerCLIForemanOpenscap::ScapContent::ListCommand.new "", ctx } before :each do ComplianceResourceMock.scap_contents_list end context "parameters" do it_should_accept "no arguments" it_should_accept_search_params end context "output" do let(:expected_record_count) { cmd.resource.call(:index).length } it_should_print_n_records it_should_print_columns ["Id", "Title"] end end context "DeleteCommand" do let(:cmd) { HammerCLIForemanOpenscap::ScapContent::DeleteCommand.new("", ctx) } context "parameters" do it_should_accept "id", ["--id=1"] end end context "UpdateCommand" do let(:cmd) { HammerCLIForemanOpenscap::ScapContent::UpdateCommand.new("", ctx) } context "parameters" do it_should_accept "id", ["--id=1"] end end context "InfoCommand" do let(:cmd) { HammerCLIForemanOpenscap::ScapContent::InfoCommand.new("", ctx) } context "parameters" do it_should_accept "id", ["--id=1"] end context "output" do with_params ["--id=1"] do it_should_print_n_records 1 it_should_print_columns ["Id", "Title", "Created at", "Original filename", "SCAP content profiles", "Organizations"] end end end end
Version data entries
12 entries across 12 versions & 1 rubygems