added status message spec, fix render nothing

This commit is contained in:
Diaspora Europe 2012-03-22 16:52:19 +01:00
parent f213500451
commit 97233851df
2 changed files with 6 additions and 1 deletions

View file

@ -71,7 +71,7 @@ class StatusMessagesController < ApplicationController
end
else
respond_to do |format|
format.json { render :nothing, :status => 403 }
format.json { render :nothing => true , :status => 403 }
format.html { redirect_to :back }
end
end

View file

@ -79,6 +79,11 @@ describe StatusMessagesController do
:aspect_ids => [@aspect1.id.to_s] }
}
it 'creates with valid json' do
post :create, status_message_hash.merge(:format => 'json')
response.status.should == 201
end
it 'removes getting started from new users' do
@controller.should_receive(:remove_getting_started)
post :create, status_message_hash