debian-mirror-gitlab/spec/lib/gitlab/markdown_cache/field_data_spec.rb

16 lines
400 B
Ruby
Raw Normal View History

2019-09-04 21:01:54 +05:30
# frozen_string_literal: true
require 'fast_spec_helper'
2020-07-28 23:09:34 +05:30
RSpec.describe Gitlab::MarkdownCache::FieldData do
2019-09-04 21:01:54 +05:30
subject(:field_data) { described_class.new }
before do
field_data[:description] = { project: double('project in context') }
end
it 'translates a markdown field name into a html field name' do
expect(field_data.html_field(:description)).to eq("description_html")
end
end