PERF: reduce storage requirements for incoming links

Only store incoming links for topics.
This commit is contained in:
Sam
2014-08-04 11:06:06 +10:00
parent b36273e4ac
commit 0920c4bea6
8 changed files with 129 additions and 120 deletions

View File

@ -24,13 +24,6 @@ describe TopicsController do
lambda { get :show, {id: topic.id} }.should_not raise_error
end
it "stores an incoming link when there is an off-site referer" do
lambda {
set_referer("http://google.com/search")
get :show, {id: topic.id}
}.should change(IncomingLink, :count).by(1)
end
describe "has_escaped_fragment?" do
render_views
@ -92,19 +85,6 @@ describe TopicsController do
end
describe 'after inserting an incoming link' do
it 'sets last link correctly' do
set_referer("http://google.com/search")
get :show, {topic_id: topic.id}
last_link = IncomingLink.last
last_link.topic_id.should == topic.id
last_link.post_number.should == 1
end
end
describe 'set_locale' do
it 'sets the one the user prefers' do
SiteSetting.stubs(:allow_user_locale).returns(true)