Commit 34b1d11f authored by Sean McGivern's avatar Sean McGivern
Browse files

Add specs for single-letter external tracker refs

parent dd0ae5d51cc3
......@@ -101,15 +101,24 @@ def helper
context "redmine project" do
let(:project) { create(:redmine_project) }
let(:issue) { ExternalIssue.new("#123", project) }
let(:reference) { issue.to_reference }
before do
project.issues_enabled = false
project.save!
project.update!(issues_enabled: false)
end
context "with a hash prefix" do
let(:issue) { ExternalIssue.new("#123", project) }
let(:reference) { issue.to_reference }
it_behaves_like "external issue tracker"
end
it_behaves_like "external issue tracker"
context "with a single-letter prefix" do
let(:issue) { ExternalIssue.new("T-123", project) }
let(:reference) { issue.to_reference }
it_behaves_like "external issue tracker"
end
end
context "jira project" do
......@@ -122,6 +131,15 @@ def helper
it_behaves_like "external issue tracker"
end
context "with a single-letter prefix" do
let(:issue) { ExternalIssue.new("J-123", project) }
it "ignores reference" do
exp = act = "Issue #{reference}"
expect(filter(act).to_html).to eq exp
end
end
context "with wrong markdown" do
let(:issue) { ExternalIssue.new("#123", project) }
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment