Sha256: 52e1a007447cc6f0f5190efe848bb4c821944410fdbb867f80e5c890e55f0128
Contents?: true
Size: 1.44 KB
Versions: 7
Compression:
Stored size: 1.44 KB
Contents
require File.join(File.dirname(__FILE__), 'test_helper') require File.join(File.dirname(__FILE__), 'apipie_resource_mock') describe HammerCLIForeman::Report do extend CommandTestHelper before :each do cmd.class.resource ApipieResourceMock.new(cmd.class.resource.resource_class) end context "ListCommand" do let(:cmd) { HammerCLIForeman::Report::ListCommand.new("", ctx) } 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)[0].length } it_should_print_n_records it_should_print_column "Id" it_should_print_column "Host" it_should_print_column "Last report" it_should_print_column "Applied" it_should_print_column "Restarted" it_should_print_column "Failed" it_should_print_column "Restart Failures" it_should_print_column "Skipped" it_should_print_column "Pending" end end context "InfoCommand" do let(:cmd) { HammerCLIForeman::Report::InfoCommand.new("", ctx) } context "parameters" do it_should_accept "id", ["--id=1"] it_should_fail_with "no arguments" end end context "DeleteCommand" do let(:cmd) { HammerCLIForeman::Report::DeleteCommand.new("", ctx) } context "parameters" do it_should_accept "id", ["--id=1"] it_should_fail_with "id missing", [] end end end
Version data entries
7 entries across 7 versions & 1 rubygems