mirror of
https://github.com/discourse/discourse.git
synced 2025-05-23 23:21:11 +08:00
Fix /p/post/user route not saving referrals
Make user id optional for /p/id/uid Add /posts/id/raw route for debugging failed post processing
This commit is contained in:
@ -49,10 +49,11 @@ describe PostsController do
|
||||
|
||||
describe 'short_link' do
|
||||
let(:post) { Fabricate(:post) }
|
||||
let(:user) { Fabricate(:user) }
|
||||
|
||||
it 'logs the incoming link once' do
|
||||
IncomingLink.expects(:add).once.returns(true)
|
||||
get :short_link, post_id: post.id, user_id: 999
|
||||
get :short_link, post_id: post.id, user_id: user.id
|
||||
response.should be_redirect
|
||||
end
|
||||
end
|
||||
|
Reference in New Issue
Block a user