Project

General

Profile

Download (654 Bytes) Statistics
| Branch: | Tag: | Revision:

hammer-cli-csv / test / setup / setup_subscriptions.rb @ f5d21adb

1
require './test/csv_test_helper'
2
require './lib/hammer_cli_csv'
3

    
4
module Setup
5
  class SetupSubscriptions < MiniTest::Unit::TestCase
6
    def test_setup
7
      start_vcr
8

    
9
      stdout,stderr = capture {
10
        hammer.run(%W{--reload-cache csv subscriptions --export --organization Test\ Corporation})
11
      }
12
      assert_equal stderr, ''
13
      assert stdout.split("\n").length >= 5, "At least two subscriptions"
14
      assert_match(/.*"Red Hat Enterprise Linux for Virtual Datacenters, Premium",1,RH00001.*/, stdout)
15
      assert_match(/.*"Red Hat Enterprise Linux for Virtual Datacenters, Standard",1,RH00002.*/, stdout)
16

    
17
      stop_vcr
18
    end
19
  end
20
end