1
0
Fork 0
forked from OpenNeo/impress

include body ID in asset JSON

This commit is contained in:
Emi Matchu 2010-05-20 20:25:36 -04:00
parent 8411d4c64a
commit cccfe08eb5
2 changed files with 4 additions and 1 deletions

View file

@ -19,7 +19,8 @@ class SwfAsset < ActiveRecord::Base
{ {
:id => id, :id => id,
:depth => depth, :depth => depth,
:local_url => local_url :local_url => local_url,
:body_id => body_id
} }
end end
end end

View file

@ -25,10 +25,12 @@ describe SwfAsset do
asset = Factory.create :swf_asset, asset = Factory.create :swf_asset,
:id => 123, :id => 123,
:zone_id => 1, :zone_id => 1,
:body_id => 234,
:url => 'http://images.neopets.com/cp/items/swf/000/000/012/12211_9969430b3a.swf' :url => 'http://images.neopets.com/cp/items/swf/000/000/012/12211_9969430b3a.swf'
asset.as_json.should == { asset.as_json.should == {
:id => 123, :id => 123,
:depth => 12, :depth => 12,
:body_id => 234,
:local_url => 'http://impress.openneo.net/assets/swf/outfit/items/000/000/012/12211_9969430b3a.swf' :local_url => 'http://impress.openneo.net/assets/swf/outfit/items/000/000/012/12211_9969430b3a.swf'
} }
end end