Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/spec
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2020-02-24 18:07:59 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2020-02-24 18:07:59 +0300
commit725ab660a432fdffcc6835ba34340e84951fb97f (patch)
tree5528e29871806cfd8f92b61b70a031bca088c685 /spec
parent00df932c458bdd6bb2107760875124054f15543f (diff)
Add latest changes from gitlab-org/gitlab@12-8-stable-ee
Diffstat (limited to 'spec')
-rw-r--r--spec/features/projects/tree/tree_show_spec.rb17
1 files changed, 17 insertions, 0 deletions
diff --git a/spec/features/projects/tree/tree_show_spec.rb b/spec/features/projects/tree/tree_show_spec.rb
index 180ffac4d4d..23b13858096 100644
--- a/spec/features/projects/tree/tree_show_spec.rb
+++ b/spec/features/projects/tree/tree_show_spec.rb
@@ -5,11 +5,14 @@ require 'spec_helper'
describe 'Projects tree', :js do
let(:user) { create(:user) }
let(:project) { create(:project, :repository) }
+ let(:gravatar_enabled) { true }
# This commit has a known state on the master branch of gitlab-test
let(:test_sha) { '7975be0116940bf2ad4321f79d02a55c5f7779aa' }
before do
+ stub_application_setting(gravatar_enabled: gravatar_enabled)
+
project.add_maintainer(user)
sign_in(user)
end
@@ -34,6 +37,20 @@ describe 'Projects tree', :js do
expect(page).not_to have_selector('.flash-alert')
end
+ context 'gravatar disabled' do
+ let(:gravatar_enabled) { false }
+
+ it 'renders last commit' do
+ visit project_tree_path(project, test_sha)
+ wait_for_requests
+
+ page.within('.project-last-commit') do
+ expect(page).to have_selector('.user-avatar-link')
+ expect(page).to have_content('Merge branch')
+ end
+ end
+ end
+
context 'for signed commit' do
it 'displays a GPG badge' do
visit project_tree_path(project, '33f3729a45c02fc67d00adb1b8bca394b0e761d9')