A new branch created for a confidential issue is named `<id>-confidential-issue`.

This commit is contained in:
Timothy Andrew 2016-04-19 09:22:55 +05:30
parent aa396ae5ee
commit f801e2243d
2 changed files with 2 additions and 2 deletions

View File

@ -158,7 +158,7 @@ class Issue < ActiveRecord::Base
def to_branch_name
if self.confidential?
"issue-#{iid}"
"#{iid}-confidential-issue"
else
"#{iid}-#{title.parameterize}"
end

View File

@ -248,7 +248,7 @@ describe Issue, models: true do
it "does not contain the issue title if confidential" do
issue = create(:issue, title: 'testing-issue', confidential: true)
expect(issue.to_branch_name).to match /\Aissue/
expect(issue.to_branch_name).to match /confidential-issue\z/
end
end
end