diff options
Diffstat (limited to 'spec/models/commit_spec.rb')
-rw-r--r-- | spec/models/commit_spec.rb | 18 |
1 files changed, 6 insertions, 12 deletions
diff --git a/spec/models/commit_spec.rb b/spec/models/commit_spec.rb index 2176eea75bc..7c67b9a3d63 100644 --- a/spec/models/commit_spec.rb +++ b/spec/models/commit_spec.rb @@ -486,7 +486,7 @@ eos it 'uses the CachedMarkdownField cache instead of the Mentionable cache', :use_clean_rails_redis_caching do expect(commit.title_html).not_to be_present - commit.all_references(project.owner).all + commit.all_references(project.first_owner).all expect(commit.title_html).to be_present expect(Rails.cache.read("banzai/commit:#{commit.id}/safe_message/single_line")).to be_nil @@ -748,29 +748,23 @@ eos describe '#work_in_progress?' do [ - 'squash! ', 'fixup! ', 'wip: ', 'WIP: ', '[WIP] ', + 'squash! ', 'fixup! ', 'draft: ', '[Draft] ', '(draft) ', 'Draft: ' - ].each do |wip_prefix| - it "detects the '#{wip_prefix}' prefix" do - commit.message = "#{wip_prefix}#{commit.message}" + ].each do |draft_prefix| + it "detects the '#{draft_prefix}' prefix" do + commit.message = "#{draft_prefix}#{commit.message}" expect(commit).to be_work_in_progress end end - it "detects WIP for a commit just saying 'wip'" do - commit.message = "wip" - - expect(commit).to be_work_in_progress - end - it "does not detect WIP for a commit just saying 'draft'" do commit.message = "draft" expect(commit).not_to be_work_in_progress end - ["FIXUP!", "Draft - ", "Wipeout"].each do |draft_prefix| + ["FIXUP!", "Draft - ", "Wipeout", "WIP: ", "[WIP] ", "wip: "].each do |draft_prefix| it "doesn't detect '#{draft_prefix}' at the start of the title as a draft" do commit.message = "#{draft_prefix} #{commit.message}" |