2
0
Fork 0
mirror of https://github.com/discourse/discourse.git synced 2025-09-06 10:50:21 +08:00

add permalinks route constraint

This commit is contained in:
Neil Lalonde 2014-08-29 11:28:16 -04:00
parent e823f568a7
commit 6b41c6b335
5 changed files with 11 additions and 21 deletions

View file

@ -2,7 +2,7 @@ require 'spec_helper'
describe PermalinksController do
describe 'show' do
pending "should redirect to a permalink's target_url with status 301" do
it "should redirect to a permalink's target_url with status 301" do
permalink = Fabricate(:permalink)
Permalink.any_instance.stubs(:target_url).returns('/t/the-topic-slug/42')
get :show, url: permalink.url
@ -10,7 +10,7 @@ describe PermalinksController do
response.status.should == 301
end
pending 'return 404 if permalink record does not exist' do
it 'return 404 if permalink record does not exist' do
get :show, url: '/not/a/valid/url'
response.status.should == 404
end