Commit 3ecfa112 authored by James Edwards-Jones's avatar James Edwards-Jones

Can save GithubService with blank API URL

parent 2e12507c
......@@ -30,17 +30,39 @@ describe 'User activates GitHub Service' do
visit project_settings_integrations_path(project)
click_link('GitHub')
fill_in_details
end
it 'activates service' do
def fill_in_details
check('Active')
fill_in "Token", with: "aaaaaaaaaa"
fill_in "Api url", with: "https://api.github.com"
fill_in "Owner", with: "h5bp"
fill_in "Repository name", with: "html5-boilerplate"
end
it 'activates service' do
click_button('Save')
expect(page).to have_content('GitHub activated.')
end
it 'allows API URL to be set' do
fill_in "Api url", with: "https://api.github.com"
click_button('Save')
expect(page).to have_content('GitHub activated.')
end
context 'with pipelines', :js do
let(:pipeline) { create(:ci_pipeline) }
let(:project) { create(:project, pipelines: [pipeline])}
it 'tests service before save' do
click_button 'Test settings and save changes'
wait_for_requests
expect(page).to have_content('GitHub activated.')
end
end
end
end
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment