require'spec_helper'describeBanzai::ReferenceParser::MergeRequestParser,lib: truedoincludeReferenceParserHelperslet(:user){create(:user)}let(:merge_request){create(:merge_request)}subject{described_class.new(merge_request.target_project,user)}let(:link){empty_html_link}describe'#referenced_by'dodescribe'when the link has a data-merge-request attribute'docontext'using an existing merge request ID'doit'returns an Array of merge requests'dolink['data-merge-request']=merge_request.id.to_sexpect(subject.referenced_by([link])).toeq([merge_request])endendcontext'using a non-existing merge request ID'doit'returns an empty Array'dolink['data-merge-request']=''expect(subject.referenced_by([link])).toeq([])endendendendend