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>2021-09-01 00:10:43 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2021-09-01 00:10:43 +0300
commitd9115c777949c14b7e12332f85fe99b100af2aeb (patch)
tree34f094a0bdb519787adafa54d58075188a30b7b5 /spec/models
parent34d6e7c91beed4420759ce5a8e1e9607db8f9c45 (diff)
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/models')
-rw-r--r--spec/models/design_management/design_spec.rb14
-rw-r--r--spec/models/integrations/datadog_spec.rb12
2 files changed, 6 insertions, 20 deletions
diff --git a/spec/models/design_management/design_spec.rb b/spec/models/design_management/design_spec.rb
index f2ce5e42eaf..b0601ea3f08 100644
--- a/spec/models/design_management/design_spec.rb
+++ b/spec/models/design_management/design_spec.rb
@@ -572,6 +572,12 @@ RSpec.describe DesignManagement::Design do
expect(described_class.link_reference_pattern).not_to match(url_for_designs(issue))
end
+ it 'intentionally ignores filenames with any special character' do
+ design = build(:design, issue: issue, filename: '"invalid')
+
+ expect(described_class.link_reference_pattern).not_to match(url_for_design(design))
+ end
+
where(:ext) do
(described_class::SAFE_IMAGE_EXT + described_class::DANGEROUS_IMAGE_EXT).flat_map do |ext|
[[ext], [ext.upcase]]
@@ -593,14 +599,6 @@ RSpec.describe DesignManagement::Design do
)
end
- context 'the file needs to be encoded' do
- let(:filename) { "my file.#{ext}" }
-
- it 'extracts the encoded filename' do
- expect(captures).to include('url_filename' => 'my%20file.' + ext)
- end
- end
-
context 'the file is all upper case' do
let(:filename) { "file.#{ext}".upcase }
diff --git a/spec/models/integrations/datadog_spec.rb b/spec/models/integrations/datadog_spec.rb
index 677bd4c5e48..7049e64c2ce 100644
--- a/spec/models/integrations/datadog_spec.rb
+++ b/spec/models/integrations/datadog_spec.rb
@@ -127,18 +127,6 @@ RSpec.describe Integrations::Datadog do
end
end
- describe '#api_keys_url' do
- subject { instance.api_keys_url }
-
- it { is_expected.to eq("https://app.#{dd_site}/account/settings#api") }
-
- context 'with unset datadog_site' do
- let(:dd_site) { '' }
-
- it { is_expected.to eq("https://docs.datadoghq.com/account_management/api-app-keys/") }
- end
- end
-
describe '#test' do
subject(:result) { saved_instance.test(pipeline_data) }