diaspora/spec/controllers/jasmine_fixtures/photos_spec.rb
Steffen van Bergerem eb7e2eac9d Update jasmine-ajax
2015-02-17 04:03:42 +01:00

20 lines
653 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 :user, alice
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