Skip to content
Snippets Groups Projects
Commit b7dfe2ae authored by GitLab Bot's avatar GitLab Bot
Browse files

Add latest changes from gitlab-org/gitlab@master

parent 25cb337c
No related branches found
No related tags found
No related merge requests found
Loading
Loading
@@ -133,3 +133,5 @@ module MigrationsHelpers
end
end
end
MigrationsHelpers.prepend_if_ee('EE::MigrationsHelpers')
Loading
Loading
@@ -149,3 +149,5 @@ end
 
require_relative '../../../ee/spec/support/helpers/ee/stub_configuration' if
Dir.exist?("#{__dir__}/../../../ee")
StubConfiguration.prepend_if_ee('EE::StubConfiguration')
Loading
Loading
@@ -139,3 +139,5 @@ module StubGitlabCalls
JSON.parse f
end
end
StubGitlabCalls.prepend_if_ee('EE::StubGitlabCalls')
Loading
Loading
@@ -78,3 +78,5 @@ end
 
require_relative '../../../ee/spec/support/helpers/ee/stub_object_storage' if
Dir.exist?("#{__dir__}/../../../ee")
StubObjectStorage.prepend_if_ee('EE::StubObjectStorage')
Loading
Loading
@@ -418,3 +418,8 @@ module TestEnv
true
end
end
require_relative('../../../ee/spec/support/helpers/ee/test_env') if Gitlab.ee?
::TestEnv.prepend_if_ee('::EE::TestEnv')
::TestEnv.extend_if_ee('::EE::TestEnv')
Loading
Loading
@@ -29,7 +29,8 @@ module WorkhorseHelpers
 
post(url,
params: workhorse_params,
headers: workhorse_rewritten_fields_header('file' => file.path)
headers: workhorse_rewritten_fields_header(file_key => file.path),
env: { 'CONTENT_TYPE' => 'multipart/form-data' }
)
end
 
Loading
Loading
Loading
Loading
@@ -230,3 +230,5 @@ module RSpec::Matchers::DSL::Macros
end
end
end
MarkdownMatchers.prepend_if_ee('EE::MarkdownMatchers')
Loading
Loading
@@ -56,7 +56,41 @@ describe 'projects/issues/show' do
end
end
 
it 'shows "Closed" if an issue has not been moved' do
context 'when the issue was duplicated' do
let(:new_issue) { create(:issue, project: project, author: user) }
before do
issue.duplicated_to = new_issue
end
context 'when user can see the duplicated issue' do
before do
project.add_developer(user)
end
it 'shows "Closed (duplicated)" if an issue has been duplicated' do
render
expect(rendered).to have_selector('.status-box-issue-closed:not(.hidden)', text: 'Closed (duplicated)')
end
it 'links "duplicated" to the new issue the original issue was duplicated to' do
render
expect(rendered).to have_selector("a[href=\"#{issue_path(new_issue)}\"]", text: 'duplicated')
end
end
context 'when user cannot see duplicated issue' do
it 'does not show duplicated issue link' do
render
expect(rendered).not_to have_selector("a[href=\"#{issue_path(new_issue)}\"]", text: 'duplicated')
end
end
end
it 'shows "Closed" if an issue has not been moved or duplicated' do
render
 
expect(rendered).to have_selector('.status-box-issue-closed:not(.hidden)', text: 'Closed')
Loading
Loading
# frozen_string_literal: true
require 'spec_helper'
 
describe 'shared/_label_row.html.haml' do
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment