diff options
author | Toon Claes <toon@gitlab.com> | 2019-07-05 10:53:16 +0200 |
---|---|---|
committer | Toon Claes <toon@gitlab.com> | 2019-07-05 10:54:16 +0200 |
commit | 2b4573b555f9012237f6adef0d4f4b7c3288784c (patch) | |
tree | 5f8e6bea20ad696703e0585ab316aeeedc1f3380 /spec | |
parent | 1e11e6ad9a7c0f48e2779db39976a5aeee3770a6 (diff) | |
download | gitlab-ce-database-review-docs.tar.gz |
Further improve database review processdatabase-review-docs
Based on the comments, we're dropping the use of a "Database Review"
issue, and I'm improve Danger more to get database reviewers suggested
by roulette.
Diffstat (limited to 'spec')
-rw-r--r-- | spec/lib/gitlab/danger/helper_spec.rb | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/spec/lib/gitlab/danger/helper_spec.rb b/spec/lib/gitlab/danger/helper_spec.rb index 92d90ac2fef..09f72e25982 100644 --- a/spec/lib/gitlab/danger/helper_spec.rb +++ b/spec/lib/gitlab/danger/helper_spec.rb @@ -85,6 +85,20 @@ describe Gitlab::Danger::Helper do end end + describe '#markdown_list' do + it 'creates a markdown list of items' do + items = %w[a b] + + expect(helper.markdown_list(items)).to eq("* `a`\n* `b`") + end + + it 'wraps items in <details> when there are more than 10 items' do + items = ('a'..'k').to_a + + expect(helper.markdown_list(items)).to match(%r{<details>[^<]+</details>}) + end + end + describe '#changes_by_category' do it 'categorizes changed files' do expect(fake_git).to receive(:added_files) { %w[foo foo.md foo.rb foo.js db/foo lib/gitlab/database/foo.rb qa/foo ee/changelogs/foo.yml] } |