# frozen_string_literal: true require 'spec_helper' RSpec.describe DiffLineEntity do include RepoHelpers let(:code) { 'hello world' } let(:line) { Gitlab::Diff::Line.new(code, 'new', 1, nil, 1) } let(:entity) { described_class.new(line, request: {}) } subject { entity.as_json } it 'exposes correct attributes' do expect(subject).to include( :line_code, :type, :old_line, :new_line, :text, :meta_data, :rich_text ) end describe '#rich_text' do let(:code) { '