diff options
Diffstat (limited to 'spec/serializers/group_issuable_autocomplete_entity_spec.rb')
-rw-r--r-- | spec/serializers/group_issuable_autocomplete_entity_spec.rb | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/spec/serializers/group_issuable_autocomplete_entity_spec.rb b/spec/serializers/group_issuable_autocomplete_entity_spec.rb new file mode 100644 index 00000000000..86ef9dea23b --- /dev/null +++ b/spec/serializers/group_issuable_autocomplete_entity_spec.rb @@ -0,0 +1,17 @@ +# frozen_string_literal: true + +require 'spec_helper' + +RSpec.describe GroupIssuableAutocompleteEntity do + let(:group) { build_stubbed(:group) } + let(:project) { build_stubbed(:project, group: group) } + let(:issue) { build_stubbed(:issue, project: project) } + + describe '#represent' do + subject { described_class.new(issue, parent_group: group).as_json } + + it 'includes the iid, title, and reference' do + expect(subject).to include(:iid, :title, :reference) + end + end +end |