Project

General

Profile

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

hammer-cli-csv / test / resources / domains_test.rb @ a2c97209

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
 --search SEARCH               Only export search results
25
 -h, --help                    print help
26
 -v, --verbose                 be verbose
27
HELP
28
      stop_vcr
29
    end
30
  end
31
end