diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2020-01-16 18:08:46 +0000 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2020-01-16 18:08:46 +0000 |
commit | aa0f0e992153e84e1cdec8a1c7310d5eb93a9f8f (patch) | |
tree | 4a662bc77fb43e1d1deec78cc7a95d911c0da1c5 /spec/lib/gitlab/danger/helper_spec.rb | |
parent | d47f9d2304dbc3a23bba7fe7a5cd07218eeb41cd (diff) | |
download | gitlab-ce-aa0f0e992153e84e1cdec8a1c7310d5eb93a9f8f.tar.gz |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/lib/gitlab/danger/helper_spec.rb')
-rw-r--r-- | spec/lib/gitlab/danger/helper_spec.rb | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/spec/lib/gitlab/danger/helper_spec.rb b/spec/lib/gitlab/danger/helper_spec.rb index edcd020a10f..ae0fcf443c5 100644 --- a/spec/lib/gitlab/danger/helper_spec.rb +++ b/spec/lib/gitlab/danger/helper_spec.rb @@ -313,6 +313,19 @@ describe Gitlab::Danger::Helper do end end + describe '#sanitize_mr_title' do + where(:mr_title, :expected_mr_title) do + 'My MR title' | 'My MR title' + 'WIP: My MR title' | 'My MR title' + end + + with_them do + subject { helper.sanitize_mr_title(mr_title) } + + it { is_expected.to eq(expected_mr_title) } + end + end + describe '#security_mr?' do it 'returns false when `gitlab_helper` is unavailable' do expect(helper).to receive(:gitlab_helper).and_return(nil) |