Project

General

Profile

Revision bfc065ce

Added by Thomas McKay over 8 years ago

roles-test - wip

roles-test - users now get roles, orgs, and locations

View differences:

test/activation_keys_test.rb
7 7
  extend CommandTestHelper
8 8

  
9 9
  before :each do
10
    @activationkey_api = ApipieResourceMock.new(KatelloApi::Resources::ActivationKey)
11
    @organization_api = ApipieResourceMock.new(KatelloApi::Resources::Organization)
12
    @environment_api = ApipieResourceMock.new(KatelloApi::Resources::Environment)
13
    @contentview_api = ApipieResourceMock.new(KatelloApi::Resources::ContentView)
14 10
  end
15 11

  
16 12
  context "ActivationKeysCommand" do
17 13

  
18 14
    let(:cmd) { HammerCLICsv::ActivationKeysCommand.new("", ctx) }
19 15

  
20
    context "parameters" do
21
      it "blah" do
22
        cmd.stubs(:get_lines).returns([
23
                                       "Name,Count,Org Label,Description,Limit,Environment,Content View,System Groups",
24
                                       "'akey',1,'org','some description','Unlimited','Library','Default_Content_view',"
25
                                      ])
26
        cmd.run(['--csv-file=some_file', '--threads=1']).must_equal HammerCLI::EX_OK
27
      end
28
    end
29 16
  end
30 17
end

Also available in: Unified diff