we only need a test for the happy path
the failure case is already covered by the test in spec/services/test_hooks/system_service_spec.rb
This commit is contained in:
		
							parent
							
								
									a2655e3fbd
								
							
						
					
					
						commit
						57e2488085
					
				|  | @ -119,14 +119,6 @@ describe 'Admin::Hooks' do | ||||||
|         WebMock.stub_request(:post, system_hook.url) |         WebMock.stub_request(:post, system_hook.url) | ||||||
|       end |       end | ||||||
| 
 | 
 | ||||||
|       it 'fails if the user does not have any repository with a merge request' do |  | ||||||
|         visit admin_hooks_path |  | ||||||
|         find('.hook-test-button.dropdown').click |  | ||||||
|         click_link 'Merge requests events' |  | ||||||
| 
 |  | ||||||
|         expect(page).to have_content 'Ensure one of your projects has merge requests.' |  | ||||||
|       end |  | ||||||
| 
 |  | ||||||
|       it 'succeeds if the user has a repository with a merge request' do |       it 'succeeds if the user has a repository with a merge request' do | ||||||
|         project = create(:project, :repository) |         project = create(:project, :repository) | ||||||
|         create(:project_member, user: user, project: project) |         create(:project_member, user: user, project: project) | ||||||
|  |  | ||||||
		Loading…
	
		Reference in New Issue