Sha256: 307ceefad0309b112e4d5e3ad5291d6e6b577fb1225fde4070cf999f9dc1bd06

Contents?: true

Size: 320 Bytes

Versions: 8

Compression:

Stored size: 320 Bytes

Contents

require 'spec_helper'

describe RestPack::Serializer::Sortable do
  class CustomSerializer
    include RestPack::Serializer
    attributes :a, :b, :c

    can_sort_by :a, :c
  end

  it 'captures the specified sorting attributes' do
    expect(CustomSerializer.serializable_sorting_attributes).to eq([:a, :c])
  end
end

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
restpack_serializer-0.6.15 spec/serializable/sortable_spec.rb
restpack_serializer-0.6.14 spec/serializable/sortable_spec.rb
restpack_serializer-0.6.13 spec/serializable/sortable_spec.rb
restpack_serializer-0.6.12 spec/serializable/sortable_spec.rb
restpack_serializer-0.6.11 spec/serializable/sortable_spec.rb
restpack_serializer-0.6.10 spec/serializable/sortable_spec.rb
restpack_serializer-0.6.9 spec/serializable/sortable_spec.rb
restpack_serializer-0.6.8 spec/serializable/sortable_spec.rb