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

controllers with rspec3 syntax

This commit is contained in:
Luciano Sousa 2015-01-09 14:04:02 -03:00
parent c96220ca76
commit bc73238c8f
50 changed files with 955 additions and 955 deletions

View file

@ -6,13 +6,13 @@ describe PermalinksController do
permalink = Fabricate(:permalink)
Permalink.any_instance.stubs(:target_url).returns('/t/the-topic-slug/42')
get :show, url: permalink.url
response.should redirect_to('/t/the-topic-slug/42')
response.status.should == 301
expect(response).to redirect_to('/t/the-topic-slug/42')
expect(response.status).to eq(301)
end
it 'return 404 if permalink record does not exist' do
get :show, url: '/not/a/valid/url'
response.status.should == 404
expect(response.status).to eq(404)
end
end