Project

General

Profile

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

hammer-cli-csv / test / resources / domains_test.rb @ 88ccfdbe

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

    
4
module Resources
5
  class TestDomains < MiniTest::Unit::TestCase
6
    def test_usage
7
      start_vcr
8
      set_user 'admin'
9

    
10
      stdout,stderr = capture {
11
        hammer.run(%W{--reload-cache csv domains --help})
12
      }
13
      assert_equal '', stderr
14
      assert_equal stdout, <<-HELP
15
**** This command is unsupported and is provided as tech preview. ****
16
Usage:
17
     csv domains [OPTIONS]
18

19
Options:
20
 --continue-on-error           Continue processing even if individual resource error
21
 --export                      Export current data instead of importing
22
 --file FILE_NAME              CSV file (default to /dev/stdout with --export, otherwise required)
23
 --organization ORGANIZATION   Only process organization matching this name
24
 -h, --help                    print help
25
 -v, --verbose                 be verbose
26
HELP
27
      stop_vcr
28
    end
29
  end
30
end