gitlab-org--gitlab-foss/spec/lib/gitlab/diff
Sean McGivern 528b5eeb76 Fix error when viewing diffs without blobs
Old merge requests can have diffs without corresponding blobs. (This also may be
possible for commit diffs in corrupt repositories.)

We can't use the `&.` operator on the blobs, because the blob objects are never
nil, but `BatchLoader` instances that delegate to `Blob`. We can't use
`Object#try`, because `Blob` doesn't inherit from `Object`.

`BatchLoader` provides a `__sync` method that returns the delegated object, but
using `itself` also works because it's forwarded, and will work for
non-`BatchLoader` instances too. So the simplest solution is to just use that
with the `&.` operator.
2018-01-04 14:33:12 +00:00
..
file_collection
formatters Commenting on image diffs 2017-10-07 04:25:17 +00:00
diff_refs_spec.rb Add specs 2017-09-25 16:56:14 +02:00
file_spec.rb Fix error when viewing diffs without blobs 2018-01-04 14:33:12 +00:00
highlight_spec.rb
inline_diff_markdown_marker_spec.rb Don't escape html entities when rich == raw line 2017-08-17 19:55:07 +02:00
inline_diff_marker_spec.rb Don't escape html entities when rich == raw line 2017-08-17 19:55:07 +02:00
inline_diff_spec.rb fix #39233 - 500 in merge request 2017-12-07 20:19:37 +01:00
line_mapper_spec.rb
parallel_diff_spec.rb
parser_spec.rb Fix diff parser so it tolerates to diff special markers in the content 2017-10-15 17:00:36 +03:00
position_spec.rb Fix 500 error for old (somewhat) MRs 2017-10-30 12:30:31 +00:00
position_tracer_spec.rb Ensure MRs always use branch refs for comparison 2017-11-28 17:01:38 +00:00