Commit e4feb64f

mo khan <mo@mokhan.ca>
2014-06-07 15:40:31
fix test for generating json response.
1 parent 9c9c442
Changed files (1)
spec
spec/controllers/my/photos_controller_spec.rb
@@ -33,6 +33,7 @@ module My
 
     describe :delete do
       let!(:photo) { create(:photo, creation_id: cake.id, image_processing: nil) }
+      let(:asset_host) { ENV['ASSET_HOST'] }
 
       before :each do
         delete :destroy, cake_id: cake.id, id: photo.id
@@ -51,8 +52,8 @@ module My
         {
           :files => [{
               :name => "example.png",
-              :url => "/uploads/photo/image/#{photo.id}/example.png",
-              :thumbnail_url => "/uploads/photo/image/#{photo.id}/thumb_example.png",
+              :url => "#{asset_host}/uploads/photo/image/#{photo.id}/large_example.png",
+              :thumbnail_url => "#{asset_host}/uploads/photo/image/#{photo.id}/thumb_example.png",
               :delete_url => photo.id,
               :delete_type => "DELETE"
             }]