Commit 21cacb36 authored by Robert Speicher's avatar Robert Speicher

Add RedactorFilter specs for invalid Group and Project references

parent 5794d65a
...@@ -37,6 +37,12 @@ module Gitlab::Markdown ...@@ -37,6 +37,12 @@ module Gitlab::Markdown
expect(doc.css('a').length).to eq 1 expect(doc.css('a').length).to eq 1
end end
it 'handles invalid Group references' do
link = reference_link(group_id: 12345)
expect { filter(link) }.not_to raise_error
end
end end
context 'with data-project-id' do context 'with data-project-id' do
...@@ -60,6 +66,12 @@ module Gitlab::Markdown ...@@ -60,6 +66,12 @@ module Gitlab::Markdown
expect(doc.css('a').length).to eq 1 expect(doc.css('a').length).to eq 1
end end
it 'handles invalid Project references' do
link = reference_link(project_id: 12345)
expect { filter(link) }.not_to raise_error
end
end end
context 'with data-user-id' do context 'with data-user-id' do
......
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