FIX: Accept HTTPS or HTTP urls on redirect

This commit is contained in:
Robin Ward
2014-01-14 14:59:51 -05:00
parent 8e5b736caa
commit 4f6283ba56
2 changed files with 23 additions and 1 deletions

View File

@@ -79,6 +79,19 @@ describe TopicLinkClick do
end
end
context 'with a HTTPS version of the same URL' do
before do
@url = TopicLinkClick.create_from(url: 'https://twitter.com', topic_id: @topic.id, ip: '127.0.0.3')
@click = TopicLinkClick.last
end
it 'creates a click' do
@click.should be_present
@click.topic_link.should == @topic_link
@url.should == 'https://twitter.com'
end
end
context 'with a valid url and topic_id' do
before do
@url = TopicLinkClick.create_from(url: @topic_link.url, topic_id: @topic.id, ip: '127.0.0.3')