From 06e4c2c9d601a067124e2653ff66e0c8c5320867 Mon Sep 17 00:00:00 2001 From: Santiago Pastorino Date: Tue, 22 Oct 2013 11:54:42 -0200 Subject: [PATCH] Test attributes declared as strings Thanks @mikegee Closes #380 --- test/fixtures/active_record.rb | 2 +- test/integration/active_record/active_record_test.rb | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/test/fixtures/active_record.rb b/test/fixtures/active_record.rb index 6ae75f43..9d020b60 100644 --- a/test/fixtures/active_record.rb +++ b/test/fixtures/active_record.rb @@ -71,7 +71,7 @@ class ARTagSerializer < ActiveModel::Serializer end class ARSectionSerializer < ActiveModel::Serializer - attributes :name + attributes 'name' end ARPost.create(title: 'New post', diff --git a/test/integration/active_record/active_record_test.rb b/test/integration/active_record/active_record_test.rb index cf914b90..702430d3 100644 --- a/test/integration/active_record/active_record_test.rb +++ b/test/integration/active_record/active_record_test.rb @@ -17,7 +17,7 @@ module ActiveModel ar_comments: [{ body: 'what a dumb post', ar_tags: [{ name: 'short' }, { name: 'whiny' }] }, { body: 'i liked it', ar_tags: [{:name=>"short"}, {:name=>"happy"}] }], ar_tags: [{ name: 'short' }, { name: 'whiny' }, { name: 'happy' }], - ar_section: { name: 'ruby' } + ar_section: { 'name' => 'ruby' } } }, post_serializer.as_json) end @@ -51,7 +51,7 @@ module ActiveModel ar_comments: [{ body: 'what a dumb post', ar_tags: [{ name: 'short' }, { name: 'whiny' }] }, { body: 'i liked it', ar_tags: [{:name=>"short"}, {:name=>"happy"}] }], ar_tags: [{ name: 'short' }, { name: 'whiny' }, { name: 'happy' }], - ar_section: { name: 'ruby' } + ar_section: { 'name' => 'ruby' } }, post_serializer.as_json) end end