remove unnecessary endpoints in `fork` tests

This commit is contained in:
Mislav Marohnić 2012-11-07 14:18:01 +01:00
Родитель d907e8b5f6
Коммит 8d50224e5b
1 изменённых файлов: 1 добавлений и 6 удалений

Просмотреть файл

@ -8,7 +8,7 @@ Feature: hub fork
Given the GitHub API server:
"""
before { halt 401 unless request.env['HTTP_AUTHORIZATION'] == 'token OTOKEN' }
get('/repos/evilchelu/dotfiles', :host_name => 'api.github.com') { '' }
get('/repos/mislav/dotfiles', :host_name => 'api.github.com') { 404 }
post('/repos/evilchelu/dotfiles/forks', :host_name => 'api.github.com') { '' }
"""
When I successfully run `hub fork`
@ -19,7 +19,6 @@ Feature: hub fork
Scenario: --no-remote
Given the GitHub API server:
"""
get('/repos/evilchelu/dotfiles') { '' }
post('/repos/evilchelu/dotfiles/forks') { '' }
"""
When I successfully run `hub fork --no-remote`
@ -29,7 +28,6 @@ Feature: hub fork
Scenario: Fork failed
Given the GitHub API server:
"""
get('/repos/evilchelu/dotfiles') { '' }
post('/repos/evilchelu/dotfiles/forks') { halt 500 }
"""
When I run `hub fork`
@ -70,7 +68,6 @@ Scenario: Related fork already exists
Given the GitHub API server:
"""
before { halt 401 unless request.env['HTTP_AUTHORIZATION'] == 'token OTOKEN' }
get('/repos/evilchelu/dotfiles') { '' }
"""
And I am "mislav" on github.com with OAuth token "WRONGTOKEN"
When I run `hub fork`
@ -83,7 +80,6 @@ Scenario: Related fork already exists
Scenario: HTTPS is preferred
Given the GitHub API server:
"""
get('/repos/evilchelu/dotfiles') { '' }
post('/repos/evilchelu/dotfiles/forks') { '' }
"""
And HTTPS is preferred
@ -110,7 +106,6 @@ Scenario: Related fork already exists
Given the GitHub API server:
"""
before { halt 401 unless request.env['HTTP_AUTHORIZATION'] == 'token FITOKEN' }
get('/api/v3/repos/evilchelu/dotfiles', :host_name => 'git.my.org') { '' }
post('/api/v3/repos/evilchelu/dotfiles/forks', :host_name => 'git.my.org') { '' }
"""
And the "origin" remote has url "git@git.my.org:evilchelu/dotfiles.git"