added status message spec, fix render nothing
This commit is contained in:
parent
f213500451
commit
97233851df
2 changed files with 6 additions and 1 deletions
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Reference in a new issue