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
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2020-04-07 09:09:25 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2020-04-07 09:09:25 +0300
commit3d064c737e8448880e6180aeddc59000a01aa6a8 (patch)
treec97dcfe02e48426f96865068ffe8dcdd17bb1a96 /spec/views
parent7ba5b9babaa5802c39e686c57cbf4a3f4725c4b0 (diff)
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/views')
-rw-r--r--spec/views/projects/issues/show.html.haml_spec.rb16
-rw-r--r--spec/views/projects/merge_requests/show.html.haml_spec.rb14
2 files changed, 29 insertions, 1 deletions
diff --git a/spec/views/projects/issues/show.html.haml_spec.rb b/spec/views/projects/issues/show.html.haml_spec.rb
index add4b44e9b6..fb09840c8f4 100644
--- a/spec/views/projects/issues/show.html.haml_spec.rb
+++ b/spec/views/projects/issues/show.html.haml_spec.rb
@@ -13,7 +13,7 @@ describe 'projects/issues/show' do
assign(:noteable, issue)
stub_template 'shared/issuable/_sidebar' => ''
stub_template 'projects/issues/_discussion' => ''
- allow(view).to receive(:issuable_meta).and_return('')
+ allow(view).to receive(:user_status).and_return('')
end
context 'when the issue is closed' do
@@ -152,4 +152,18 @@ describe 'projects/issues/show' do
expect(rendered).not_to have_selector('#js-sentry-error-stack-trace')
end
end
+
+ context 'when issue is created by a GitLab team member' do
+ let(:user) { create(:user, email: 'test@gitlab.com') }
+
+ before do
+ allow(Gitlab).to receive(:com?).and_return(true)
+ end
+
+ it 'renders an employee badge next to their name' do
+ render
+
+ expect(rendered).to have_selector('[aria-label="GitLab Team Member"]')
+ end
+ end
end
diff --git a/spec/views/projects/merge_requests/show.html.haml_spec.rb b/spec/views/projects/merge_requests/show.html.haml_spec.rb
index 6023527cb28..67e7c3cf2fb 100644
--- a/spec/views/projects/merge_requests/show.html.haml_spec.rb
+++ b/spec/views/projects/merge_requests/show.html.haml_spec.rb
@@ -93,6 +93,20 @@ describe 'projects/merge_requests/show.html.haml' do
end
end
+ context 'when merge request is created by a GitLab team member' do
+ let(:user) { create(:user, email: 'test@gitlab.com') }
+
+ before do
+ allow(Gitlab).to receive(:com?).and_return(true)
+ end
+
+ it 'renders an employee badge next to their name' do
+ render
+
+ expect(rendered).to have_selector('[aria-label="GitLab Team Member"]')
+ end
+ end
+
def serialize_issuable_sidebar(user, project, merge_request)
MergeRequestSerializer
.new(current_user: user, project: project)