Whitespace cleanup.
This commit is contained in:
parent
f1d669a024
commit
02fa065571
1 changed files with 7 additions and 7 deletions
|
|
@ -13,23 +13,23 @@ describe PhotosController do
|
|||
sign_in :user, alice
|
||||
request.env["HTTP_REFERER"] = ''
|
||||
end
|
||||
|
||||
|
||||
describe '#create' do
|
||||
before do
|
||||
@params = {:photo => {:aspect_ids => "all"}, :qqfile => Rack::Test::UploadedFile.new("spec/fixtures/button.png", "image/png") }
|
||||
end
|
||||
|
||||
|
||||
it 'accepts a photo from a regular form submission' do
|
||||
lambda {
|
||||
post :create, @params
|
||||
}.should change(Photo, :count).by(1)
|
||||
end
|
||||
|
||||
|
||||
it 'returns application/json when possible' do
|
||||
request.env['HTTP_ACCEPT'] = 'application/json'
|
||||
post(:create, @params).headers['Content-Type'].should match 'application/json.*'
|
||||
end
|
||||
|
||||
|
||||
it 'returns text/html by default' do
|
||||
request.env['HTTP_ACCEPT'] = 'text/html,*/*'
|
||||
post(:create, @params).headers['Content-Type'].should match 'text/html.*'
|
||||
|
|
@ -59,10 +59,10 @@ describe PhotosController do
|
|||
describe '#index' do
|
||||
it "succeeds without any available pictures" do
|
||||
get :index, :person_id => Factory(:person).id.to_s
|
||||
|
||||
|
||||
response.should be_success
|
||||
end
|
||||
|
||||
|
||||
it "displays the logged in user's pictures" do
|
||||
get :index, :person_id => alice.person.id.to_s
|
||||
assigns[:person].should == alice.person
|
||||
|
|
@ -161,7 +161,7 @@ describe PhotosController do
|
|||
it "succeeds" do
|
||||
response.should be_success
|
||||
end
|
||||
|
||||
|
||||
it "assigns the photo" do
|
||||
assigns[:photo].should == @photo
|
||||
end
|
||||
|
|
|
|||
Loading…
Reference in a new issue