From e087284daae9cbfdea3ccd4c7c5ee772d54772cc Mon Sep 17 00:00:00 2001 From: Maxwell Salzberg Date: Mon, 24 Oct 2011 14:10:15 -0700 Subject: [PATCH] fix the contacts link for the multi stream; make the contacts link default to the contacts page --- lib/stream/base.rb | 2 +- spec/lib/stream/base_spec.rb | 5 +++++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/lib/stream/base.rb b/lib/stream/base.rb index 9013671fa..701658911 100644 --- a/lib/stream/base.rb +++ b/lib/stream/base.rb @@ -66,7 +66,7 @@ class Stream::Base # @return [String] def contacts_link - '#' + Rails.application.routes.url_helpers.contacts_path end #helpers diff --git a/spec/lib/stream/base_spec.rb b/spec/lib/stream/base_spec.rb index 182627708..d9f538292 100644 --- a/spec/lib/stream/base_spec.rb +++ b/spec/lib/stream/base_spec.rb @@ -4,6 +4,11 @@ describe Stream::Base do before do @stream = Stream::Base.new(alice) end + describe '#contacts_link' do + it 'should default to your contacts page' do + @stream.contacts_link.should =~ /contacts/ + end + end describe '.can_comment?' do before do