track incoming links, amend share link to include user
fix pm styling
This commit is contained in:
parent
27edebfaef
commit
37867af1bb
16 changed files with 136 additions and 74 deletions
spec/controllers
|
@ -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) }
|
||||
|
|
Reference in a new issue