diff options
author | Ash McKenzie <amckenzie@gitlab.com> | 2018-09-18 16:53:10 +1000 |
---|---|---|
committer | Ash McKenzie <amckenzie@gitlab.com> | 2018-09-18 16:55:10 +1000 |
commit | 2f976d33f3a21d22083d439c0371bbbad8584fe9 (patch) | |
tree | c883aec9b5d3e44845e7806e6ccb048a604c5658 | |
parent | dd54651b987c473fc42ae6c81daf0a47a92f9dca (diff) | |
download | gitlab-shell-2f976d33f3a21d22083d439c0371bbbad8584fe9.tar.gz |
Remove redundant logic from custom_spec.rb
-rw-r--r-- | spec/action/custom_spec.rb | 16 |
1 files changed, 1 insertions, 15 deletions
diff --git a/spec/action/custom_spec.rb b/spec/action/custom_spec.rb index 78533c3..aed70fe 100644 --- a/spec/action/custom_spec.rb +++ b/spec/action/custom_spec.rb @@ -26,22 +26,12 @@ describe Action::Custom do end context 'that are valid' do - where(:primary_repo_data) do - [ - [ 'http://localhost:3001/user1/repo1.git' ], - [{ 'http' => 'http://localhost:3001/user1/repo1.git' }], - [{ 'http' => 'http://localhost:3001/user1/repo1.git', 'ssh' => 'ssh://user@localhost:3002/user1/repo1.git' }] - ] - end - - with_them do let(:payload) do { 'action' => 'geo_proxy_to_primary', 'data' => { 'api_endpoints' => %w{/api/v4/fake/info_refs /api/v4/fake/push}, - 'gl_username' => 'user1', - 'primary_repo' => primary_repo_data + 'primary_repo' => 'http://localhost:3001/user1/repo1.git' } } end @@ -85,7 +75,6 @@ describe Action::Custom do end end end - end context 'that are invalid' do context 'where api_endpoints gl_id is missing' do @@ -93,7 +82,6 @@ describe Action::Custom do { 'action' => 'geo_proxy_to_primary', 'data' => { - 'gl_username' => 'user1', 'primary_repo' => 'http://localhost:3001/user1/repo1.git' } } @@ -110,7 +98,6 @@ describe Action::Custom do 'action' => 'geo_proxy_to_primary', 'data' => { 'api_endpoints' => [], - 'gl_username' => 'user1', 'primary_repo' => 'http://localhost:3001/user1/repo1.git' } } @@ -135,7 +122,6 @@ describe Action::Custom do 'action' => 'geo_proxy_to_primary', 'data' => { 'api_endpoints' => %w{/api/v4/fake/info_refs_bad /api/v4/fake/push_bad}, - 'gl_username' => 'user1', 'primary_repo' => 'http://localhost:3001/user1/repo1.git' } } |