status of a redirect page is now 301 (previously 302)

This commit is contained in:
did 2012-06-05 09:32:10 -07:00
parent 2bd9e254c8
commit 55b7d4dbf2
4 changed files with 4 additions and 4 deletions

View File

@ -1,7 +1,7 @@
PATH
remote: .
specs:
locomotive_cms (2.0.0.rc7)
locomotive_cms (2.0.0.rc8)
RedCloth (~> 4.2.8)
actionmailer-with-request (~> 0.3.0)
bson_ext (~> 1.5.2)

View File

@ -11,7 +11,7 @@ module Locomotive
else
@page = locomotive_page
redirect_to(@page.redirect_url) and return if @page.present? && @page.redirect?
redirect_to(@page.redirect_url, :status => 301) and return if @page.present? && @page.redirect?
render_no_page_error and return if @page.nil?

View File

@ -3,7 +3,7 @@ require File.expand_path('../boot', __FILE__)
require 'action_controller/railtie'
require 'action_mailer/railtie'
require 'active_resource/railtie'
require 'sprockets/railtie'
# require 'sprockets/railtie'
# Bundler.require
Bundler.require(*Rails.groups(:assets => %w(development test)))

View File

@ -130,7 +130,7 @@ describe 'Locomotive rendering system' do
end
it 'redirects to the redirect_url' do
@controller.expects(:redirect_to).with('http://www.example.com/').returns(true)
@controller.expects(:redirect_to).with('http://www.example.com/', { :status => 301 }).returns(true)
@controller.send(:render_locomotive_page)
end