Skip to content

Commit

Permalink
Merge bc0bdca into 80d0fcf
Browse files Browse the repository at this point in the history
  • Loading branch information
jywarren committed Apr 29, 2018
2 parents 80d0fcf + bc0bdca commit 4c93b5f
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 2 deletions.
4 changes: 2 additions & 2 deletions app/controllers/legacy_controller.rb
Expand Up @@ -56,8 +56,8 @@ def node
end

def report
@node = Node.find_by(slug: params[:id])
redirect_to: @node.path, status: 301
node = Node.find_by(slug: params[:id])
redirect_to node.path, status: 301
end

def rss
Expand Down
10 changes: 10 additions & 0 deletions test/functional/legacy_controller_test.rb
@@ -0,0 +1,10 @@
require 'test_helper'

class LegacyControllerTest < ActionController::TestCase

test 'report redirect' do
get :report, id: 'my-very-first-post-to-public-lab'
assert_response :redirect
end

end

0 comments on commit 4c93b5f

Please sign in to comment.