Merge branch 'master' into 236_paginate_has_many
This commit is contained in:
commit
9f8906d840
@ -39,7 +39,7 @@ module Locomotive
|
||||
end
|
||||
|
||||
def render_no_site_error
|
||||
render :template => '/admin/errors/no_site', :layout => false
|
||||
render :template => '/admin/errors/no_site', :layout => false, :status => :not_found
|
||||
end
|
||||
|
||||
def validate_site_membership
|
||||
|
@ -147,11 +147,19 @@ describe Locomotive::Routing::SiteDispatcher do
|
||||
|
||||
describe '#render_no_site_error' do
|
||||
|
||||
it 'renders the no site template with no layout' do
|
||||
@controller.expects(:render).with(:template => '/admin/errors/no_site', :layout => false)
|
||||
before :each do
|
||||
@controller.instance_variable_set('@_response', ActionDispatch::Response.new)
|
||||
@controller.send(:render_no_site_error)
|
||||
end
|
||||
|
||||
it 'should have a no site error message' do
|
||||
@controller.response.body.should include 'No Site'
|
||||
end
|
||||
|
||||
it 'should have a 404 not found status' do
|
||||
@controller.response.should be_not_found
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
describe '#validate_site_membership' do
|
||||
|
Loading…
Reference in New Issue
Block a user