BigW Consortium Gitlab

show_project_spec.rb 663 Bytes
Newer Older
1 2 3 4 5 6 7 8 9 10
require 'spec_helper'

describe 'Project show page', feature: true do
  context 'when project pending delete' do
    let(:project) { create(:project, :empty_repo, pending_delete: true) }

    before do
      sign_in(project.owner)
    end

11 12
    it 'shows error message if deletion for project fails' do
      project.update_attributes(delete_error: "Something went wrong", pending_delete: false)
13

14
      visit project_path(project)
15 16

      expect(page).to have_selector('.project-deletion-failed-message')
17
      expect(page).to have_content("This project was scheduled for deletion, but failed with the following message: #{project.delete_error}")
18 19 20
    end
  end
end