Skip to content
Snippets Groups Projects
Commit 21cacb36 authored by Robert Speicher's avatar Robert Speicher
Browse files

Add RedactorFilter specs for invalid Group and Project references

parent 5794d65a
No related branches found
No related tags found
1 merge request!1090Separate rendering of Markdown reference links from redacting those the user doesn't have access to and extracting referenced objects
Loading
@@ -37,6 +37,12 @@ module Gitlab::Markdown
Loading
@@ -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
Loading
@@ -60,6 +66,12 @@ module Gitlab::Markdown
Loading
@@ -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
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment