adjust the content_entry_repository unit specs: order_by of a content type returns now a hash
did
committed Mar 07, 2015
commit d7649a7346c3bf807e0e282854bebe7f5f0225ce
Showing 2
changed files with
3 additions
and 3 deletions
locomotive/steam/entities/content_type.rb b/lib/locomotive/steam/entities/content_type.rb
+1
-1
| @@ | @@ -38,7 +38,7 @@ module Locomotive::Steam |
| name = field.name | |
| end | |
| - | { name.to_sym => self.order_direction } |
| + | { name.to_sym => self.order_direction.to_s } |
| end | |
| end | |
spec/unit/repositories/content_entry_repository_spec.rb
+2
-2
| @@ | @@ -89,7 +89,7 @@ describe Locomotive::Steam::ContentEntryRepository do |
| describe '#next' do | |
| - | let(:type) { build_content_type('Articles', order_by: '_position asc', label_field_name: :title, localized_names: [:title], fields_by_name: { title: instance_double('Field', name: :title, type: :string) }) } |
| + | let(:type) { build_content_type('Articles', order_by: { _position: 'asc' }, label_field_name: :title, localized_names: [:title], fields_by_name: { title: instance_double('Field', name: :title, type: :string) }) } |
| let(:entries) do | |
| [ | |
| { content_type_id: 1, _position: 0, _label: 'Update #1', title: { fr: 'Mise a jour #1' }, text: { en: 'added some free stuff', fr: 'phrase FR' }, date: '2009/05/12', category: 'General' }, | |
| @@ | @@ -121,7 +121,7 @@ describe Locomotive::Steam::ContentEntryRepository do |
| describe '#previous' do | |
| - | let(:type) { build_content_type('Articles', order_by: '_position asc', label_field_name: :title, localized_names: [:title], fields_by_name: { title: instance_double('Field', name: :title, type: :string) }) } |
| + | let(:type) { build_content_type('Articles', order_by: { _position: 'asc' }, label_field_name: :title, localized_names: [:title], fields_by_name: { title: instance_double('Field', name: :title, type: :string) }) } |
| let(:entries) do | |
| [ | |
| { content_type_id: 1, _position: 0, _label: 'Update #1', title: { fr: 'Mise a jour #1' }, text: { en: 'added some free stuff', fr: 'phrase FR' }, date: '2009/05/12', category: 'General' }, | |