gitlab-org--gitlab-foss/spec/features/projects/show_project_spec.rb

21 lines
658 B
Ruby
Raw Normal View History

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