debian-mirror-gitlab/spec/features/projects/deploy_keys_spec.rb

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

35 lines
784 B
Ruby
Raw Normal View History

2019-10-12 21:52:04 +05:30
# frozen_string_literal: true
2017-08-17 22:00:37 +05:30
require 'spec_helper'
2020-06-23 00:09:42 +05:30
RSpec.describe 'Project deploy keys', :js do
2017-08-17 22:00:37 +05:30
let(:user) { create(:user) }
let(:project) { create(:project_empty_repo) }
before do
2018-11-18 11:00:15 +05:30
project.add_maintainer(user)
2017-09-10 17:25:29 +05:30
sign_in(user)
2017-08-17 22:00:37 +05:30
end
describe 'removing key' do
before do
create(:deploy_keys_project, project: project)
end
it 'removes association between project and deploy key' do
2020-05-05 14:28:15 +05:30
visit project_settings_repository_path(project)
2017-08-17 22:00:37 +05:30
2021-06-08 01:23:25 +05:30
page.within(find('.rspec-deploy-keys-settings')) do
2018-10-15 14:42:47 +05:30
expect(page).to have_selector('.deploy-key', count: 1)
2017-08-17 22:00:37 +05:30
2021-06-08 01:23:25 +05:30
click_button 'Remove'
click_button 'Remove deploy key'
2017-08-17 22:00:37 +05:30
2018-11-08 19:23:39 +05:30
wait_for_requests
2018-10-15 14:42:47 +05:30
expect(page).to have_selector('.deploy-key', count: 0)
2017-08-17 22:00:37 +05:30
end
end
end
end