diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2020-04-03 21:10:03 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2020-04-03 21:10:03 +0300 |
commit | b6847c621ff246e6abceb90545d5a608318762d6 (patch) | |
tree | 460da2a6c2be2e4f5164c2bba1851b66260f850d /spec/lib | |
parent | c08d9c22569d1c9e7c7737e183969593394133d9 (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/lib')
-rw-r--r-- | spec/lib/gitlab/danger/changelog_spec.rb | 14 | ||||
-rw-r--r-- | spec/lib/gitlab/gfm/reference_rewriter_spec.rb | 8 |
2 files changed, 5 insertions, 17 deletions
diff --git a/spec/lib/gitlab/danger/changelog_spec.rb b/spec/lib/gitlab/danger/changelog_spec.rb index c61e47f80d9..ba23c3828de 100644 --- a/spec/lib/gitlab/danger/changelog_spec.rb +++ b/spec/lib/gitlab/danger/changelog_spec.rb @@ -28,18 +28,6 @@ describe Gitlab::Danger::Changelog do describe '#needed?' do subject { changelog.needed? } - [ - { docs: nil }, - { none: nil }, - { docs: nil, none: nil } - ].each do |categories| - let(:changes_by_category) { categories } - - it "is falsy when categories don't require a changelog" do - is_expected.to be_falsy - end - end - where(:categories, :labels) do { backend: nil } | %w[backend backstage] { frontend: nil, docs: nil } | ['ci-build'] @@ -50,7 +38,7 @@ describe Gitlab::Danger::Changelog do let(:changes_by_category) { categories } let(:mr_labels) { labels } - it "is falsy when labels require no changelog" do + it "is falsy when categories and labels require no changelog" do is_expected.to be_falsy end end diff --git a/spec/lib/gitlab/gfm/reference_rewriter_spec.rb b/spec/lib/gitlab/gfm/reference_rewriter_spec.rb index a3904f4a97c..084dde1f93f 100644 --- a/spec/lib/gitlab/gfm/reference_rewriter_spec.rb +++ b/spec/lib/gitlab/gfm/reference_rewriter_spec.rb @@ -3,11 +3,11 @@ require 'spec_helper' describe Gitlab::Gfm::ReferenceRewriter do - let(:group) { create(:group) } - let(:old_project) { create(:project, name: 'old-project', group: group) } - let(:new_project) { create(:project, name: 'new-project', group: group) } - let(:user) { create(:user) } + let_it_be(:group) { create(:group) } + let_it_be(:user) { create(:user) } + let(:new_project) { create(:project, name: 'new-project', group: group) } + let(:old_project) { create(:project, name: 'old-project', group: group) } let(:old_project_ref) { old_project.to_reference_base(new_project) } let(:text) { 'some text' } |