track incoming links, amend share link to include user

fix pm styling
This commit is contained in:
Sam
2013-04-24 18:05:35 +10:00
parent 27edebfaef
commit 37867af1bb
16 changed files with 136 additions and 74 deletions

View File

@ -3,6 +3,15 @@ require 'spec_helper'
describe PostsController do
describe 'short_link' do
it 'logs the incoming link once' do
IncomingLink.expects(:add).once.returns(true)
p = Fabricate(:post)
get :short_link, post_id: p.id, user_id: 999
response.should be_redirect
end
end
describe 'show' do
let(:post) { Fabricate(:post, user: log_in) }