debian-mirror-gitlab/spec/features/projects/forks/fork_list_spec.rb

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

38 lines
1 KiB
Ruby
Raw Normal View History

2019-10-12 21:52:04 +05:30
# frozen_string_literal: true
2019-07-07 11:18:12 +05:30
require 'spec_helper'
2020-06-23 00:09:42 +05:30
RSpec.describe 'listing forks of a project' do
2019-07-07 11:18:12 +05:30
include ProjectForksHelper
include ExternalAuthorizationServiceHelpers
let(:source) { create(:project, :public, :repository) }
let!(:fork) { fork_project(source, nil, repository: true) }
let(:user) { create(:user) }
before do
source.add_maintainer(user)
sign_in(user)
end
2019-12-26 22:10:19 +05:30
it 'shows the forked project in the list with commit as description', :sidekiq_might_not_need_inline do
2019-07-07 11:18:12 +05:30
visit project_forks_path(source)
page.within('li.project-row') do
expect(page).to have_content(fork.full_name)
expect(page).to have_css('a.commit-row-message')
end
end
it 'does not show the commit message when an external authorization service is used' do
enable_external_authorization_service_check
visit project_forks_path(source)
page.within('li.project-row') do
expect(page).to have_content(fork.full_name)
expect(page).not_to have_css('a.commit-row-message')
end
end
end