Sha256: 5aabd69bc3c15b0aadc76089347a83850dc3647450c027a15d3e1708eae3598d

Contents?: true

Size: 478 Bytes

Versions: 1

Compression:

Stored size: 478 Bytes

Contents

# encoding: utf-8

require 'spec_helper'

describe Mapper::Header, '#group' do
  subject(:header) { left.group(models: mapper) }

  let(:left) { Mapper::Header.build([[:id], [:name]]) }
  let(:mapper) { Mapper.build([[:id], [:title]]) }

  it 'returns a header with embedded collection attribute' do
    expected = Mapper::Header.build([
      [:id], [:name], mapper.attribute(Mapper::Attribute::EmbeddedCollection, :models)
    ])

    expect(header).to eq(expected)
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
rom-0.2.0 spec/unit/rom/mapper/header/group_spec.rb