Sha256: 4bd4eb703cb5a697e7b72783821134ef6d2999de0e41d3b8593844b9d9dd8195
Contents?: true
Size: 1.39 KB
Versions: 2
Compression:
Stored size: 1.39 KB
Contents
require_relative "../test_helper" 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
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
hammer_cli_foreman_openscap-0.1.2 | test/unit/scap_content_test.rb |
hammer_cli_foreman_openscap-0.1.1 | test/unit/scap_content_test.rb |