github.com/jingweno/gh@v2.1.1-0.20221007190738-04a7985fa9a1+incompatible/features/remote_add.feature (about)

     1  Feature: hub remote add
     2    Background:
     3      Given I am in "dotfiles" git repo
     4  
     5    Scenario: Add origin remote for my own repo
     6      Given I am "mislav" on GitHub.com
     7      And there are no remotes
     8      When I successfully run `hub remote add origin`
     9      Then the url for "origin" should be "git://github.com/mislav/dotfiles.git"
    10      And there should be no output
    11  
    12    Scenario: Add private origin remote for my own repo
    13      Given I am "mislav" on GitHub.com
    14      And there are no remotes
    15      When I successfully run `hub remote add -p origin`
    16      Then the url for "origin" should be "git@github.com:mislav/dotfiles.git"
    17      And there should be no output
    18  
    19    Scenario: Unchanged public remote add
    20      When I successfully run `hub remote add origin http://github.com/defunkt/resque.git`
    21      Then the url for "origin" should be "http://github.com/defunkt/resque.git"
    22      And there should be no output
    23  
    24    Scenario: Unchanged private remote add
    25      When I successfully run `hub remote add origin git@github.com:defunkt/resque.git`
    26      Then the url for "origin" should be "git@github.com:defunkt/resque.git"
    27      And there should be no output
    28  
    29    Scenario: Unchanged local path remote add
    30      When I successfully run `hub remote add myremote ./path`
    31      Then the git command should be unchanged
    32      And there should be no output
    33  
    34    Scenario: Unchanged local absolute path remote add
    35      When I successfully run `hub remote add myremote /path`
    36      Then the git command should be unchanged
    37      And there should be no output
    38  
    39    Scenario: Unchanged remote add with host alias
    40      When I successfully run `hub remote add myremote server:/git/repo.git`
    41      Then the git command should be unchanged
    42      And there should be no output
    43  
    44    @wip
    45    Scenario: Add new remote for Enterprise repo
    46      Given "git.my.org" is a whitelisted Enterprise host
    47      And the "origin" remote has url "git@git.my.org:mislav/topsekrit.git"
    48      When I successfully run `hub remote add another`
    49      Then the url for "another" should be "git@git.my.org:another/topsekrit.git"
    50      And there should be no output
    51  
    52    Scenario: Add public remote
    53      When I successfully run `hub remote add mislav`
    54      Then the url for "mislav" should be "git://github.com/mislav/dotfiles.git"
    55      And there should be no output
    56  
    57    Scenario: Add private remote
    58      When I successfully run `hub remote add -p mislav`
    59      Then the url for "mislav" should be "git@github.com:mislav/dotfiles.git"
    60      And there should be no output
    61  
    62    Scenario: Add remote with arguments
    63      When I successfully run `hub remote add -f mislav`
    64      Then "git remote add -f mislav git://github.com/mislav/dotfiles.git" should be run
    65      And there should be no output
    66  
    67    Scenario: Add HTTPS protocol remote
    68      Given HTTPS is preferred
    69      When I successfully run `hub remote add mislav`
    70      Then the url for "mislav" should be "https://github.com/mislav/dotfiles.git"
    71      And there should be no output
    72  
    73    Scenario: Add named public remote
    74      When I successfully run `hub remote add mm mislav`
    75      Then the url for "mm" should be "git://github.com/mislav/dotfiles.git"
    76      And there should be no output
    77  
    78    Scenario: set-url
    79      Given the "origin" remote has url "git://github.com/evilchelu/dotfiles.git"
    80      When I successfully run `hub remote set-url origin mislav`
    81      Then the url for "origin" should be "git://github.com/mislav/dotfiles.git"
    82      And there should be no output
    83  
    84    Scenario: Add public remote including repo name
    85      When I successfully run `hub remote add mislav/dotfilez.js`
    86      Then the url for "mislav" should be "git://github.com/mislav/dotfilez.js.git"
    87      And there should be no output
    88  
    89    Scenario: Add named public remote including repo name
    90      When I successfully run `hub remote add mm mislav/dotfilez.js`
    91      Then the url for "mm" should be "git://github.com/mislav/dotfilez.js.git"
    92      And there should be no output
    93  
    94    Scenario: Add named private remote
    95      When I successfully run `hub remote add -p mm mislav`
    96      Then the url for "mm" should be "git@github.com:mislav/dotfiles.git"
    97      And there should be no output
    98  
    99    Scenario: Add private remote including repo name
   100      When I successfully run `hub remote add -p mislav/dotfilez.js`
   101      Then the url for "mislav" should be "git@github.com:mislav/dotfilez.js.git"
   102      And there should be no output
   103  
   104    Scenario: Add named private remote including repo name
   105      When I successfully run `hub remote add -p mm mislav/dotfilez.js`
   106      Then the url for "mm" should be "git@github.com:mislav/dotfilez.js.git"
   107      And there should be no output