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-01-19 12:10:32 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2021-01-19 12:10:32 +0300
commitfcef382cb994b8ecdbff75490bab0425a35f2641 (patch)
tree1789e9bbda6c4beea4451feb7970705296787445 /spec/lib/banzai/pipeline
parentb8f44765693d6f6e4c8df6ab7b7c7b1141f83b26 (diff)
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/lib/banzai/pipeline')
-rw-r--r--spec/lib/banzai/pipeline/pre_process_pipeline_spec.rb8
1 files changed, 8 insertions, 0 deletions
diff --git a/spec/lib/banzai/pipeline/pre_process_pipeline_spec.rb b/spec/lib/banzai/pipeline/pre_process_pipeline_spec.rb
index fc74c592867..f0498f41b61 100644
--- a/spec/lib/banzai/pipeline/pre_process_pipeline_spec.rb
+++ b/spec/lib/banzai/pipeline/pre_process_pipeline_spec.rb
@@ -24,4 +24,12 @@ RSpec.describe Banzai::Pipeline::PreProcessPipeline do
expect(result[:output]).to include "> blockquote\n"
end
end
+
+ it 'truncates the text if requested' do
+ text = (['foo'] * 10).join(' ')
+
+ result = described_class.call(text, limit: 12)
+
+ expect(result[:output]).to eq('foo foo f…')
+ end
end