diaspora/spec/controllers/jasmine_fixtures/photos_spec.rb
2016-08-11 12:25:36 +03:00

20 lines
660 B
Ruby

# Copyright (c) 2010-2011, Diaspora Inc. This file is
# licensed under the Affero General Public License version 3 or later. See
# the COPYRIGHT file.
require 'spec_helper'
describe PhotosController, :type => :controller do
before do
@alices_photo = alice.post(:photo, :user_file => uploaded_photo, :to => alice.aspects.first.id, :public => false)
sign_in alice, scope: :user
end
describe '#index' do
it "generates a jasmine fixture", :fixture => true do
request.env['HTTP_ACCEPT'] = 'application/json'
get :index, :person_id => alice.person.guid.to_s
save_fixture(response.body, "photos_json")
end
end
end