debian-mirror-gitlab/spec/features/projects/settings/user_archives_project_spec.rb

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

40 lines
880 B
Ruby
Raw Normal View History

2019-10-12 21:52:04 +05:30
# frozen_string_literal: true
2018-03-17 18:26:18 +05:30
require 'spec_helper'
2020-06-23 00:09:42 +05:30
RSpec.describe 'Projects > Settings > User archives a project' do
2018-03-17 18:26:18 +05:30
let(:user) { create(:user) }
before do
2018-11-18 11:00:15 +05:30
project.add_maintainer(user)
2018-03-17 18:26:18 +05:30
sign_in(user)
2018-10-15 14:42:47 +05:30
visit edit_project_path(project)
2018-03-17 18:26:18 +05:30
end
context 'when a project is archived' do
let(:project) { create(:project, :archived, namespace: user.namespace) }
it 'unarchives a project' do
expect(page).to have_content('Unarchive project')
click_link('Unarchive')
expect(page).not_to have_content('Archived project')
end
end
context 'when a project is unarchived' do
let(:project) { create(:project, :repository, namespace: user.namespace) }
it 'archives a project' do
expect(page).to have_content('Archive project')
click_link('Archive')
expect(page).to have_content('Archived')
end
end
end