gitlab-org--gitlab-foss/spec/features/projects/show_project_spec.rb
Jacopo 0ce6785851 Replaces tag: true into :tag in the specs
Replaces all the explicit include metadata syntax in the specs (tag:
true) into the implicit one (:tag).
Added a cop to prevent future errors and handle autocorrection.
2017-10-07 13:57:54 +02:00

20 lines
658 B
Ruby

require 'spec_helper'
describe 'Project show page', :feature do
context 'when project pending delete' do
let(:project) { create(:project, :empty_repo, pending_delete: true) }
before do
sign_in(project.owner)
end
it 'shows error message if deletion for project fails' do
project.update_attributes(delete_error: "Something went wrong", pending_delete: false)
visit project_path(project)
expect(page).to have_selector('.project-deletion-failed-message')
expect(page).to have_content("This project was scheduled for deletion, but failed with the following message: #{project.delete_error}")
end
end
end