2019-09-30 05:06:31 -04:00
|
|
|
# frozen_string_literal: true
|
|
|
|
|
2017-08-11 12:48:06 -04:00
|
|
|
require 'spec_helper'
|
|
|
|
|
2020-06-24 02:09:01 -04:00
|
|
|
RSpec.describe NoteEntity do
|
2017-08-11 12:48:06 -04:00
|
|
|
include Gitlab::Routing
|
|
|
|
|
|
|
|
let(:request) { double('request', current_user: user, noteable: note.noteable) }
|
|
|
|
|
|
|
|
let(:entity) { described_class.new(note, request: request) }
|
|
|
|
let(:note) { create(:note) }
|
|
|
|
let(:user) { create(:user) }
|
2019-12-17 13:07:48 -05:00
|
|
|
|
2017-08-11 12:48:06 -04:00
|
|
|
subject { entity.as_json }
|
|
|
|
|
2018-04-03 12:03:00 -04:00
|
|
|
it_behaves_like 'note entity'
|
2017-08-11 12:48:06 -04:00
|
|
|
end
|