summaryrefslogtreecommitdiff
path: root/spec/features/projects/services/user_activates_atlassian_bamboo_ci_spec.rb
blob: 195735652657983d54a39353dc6147861f8c9ebc (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
require 'spec_helper'

describe 'User activates Atlassian Bamboo CI' do
  let(:project) { create(:project) }
  let(:user) { create(:user) }

  before do
    project.add_maintainer(user)
    sign_in(user)

    visit(project_settings_integrations_path(project))

    click_link('Atlassian Bamboo CI')
  end

  it 'activates service' do
    check('Active')
    fill_in('Bamboo url', with: 'http://bamboo.example.com')
    fill_in('Build key', with: 'KEY')
    fill_in('Username', with: 'user')
    fill_in('Password', with: 'verySecret')
    click_button('Save')

    expect(page).to have_content('Atlassian Bamboo CI activated.')

    # Password field should not be filled in.
    click_link('Atlassian Bamboo CI')

    expect(find_field('Enter new password').value).to be_nil
  end
end