diff --git a/app/controllers/status_messages_controller.rb b/app/controllers/status_messages_controller.rb index 4ba17c9be..0f3c39e5c 100644 --- a/app/controllers/status_messages_controller.rb +++ b/app/controllers/status_messages_controller.rb @@ -18,7 +18,6 @@ class StatusMessagesController < ApplicationController if @contact @aspects_with_person = @contact.aspects @aspect_ids = @aspects_with_person.map{|x| x.id} - puts @aspect_ids.inspect @contacts_of_contact = @contact.contacts render :layout => nil end diff --git a/app/views/status_messages/new.html.haml b/app/views/status_messages/new.html.haml index f83c0285e..0ed7386ae 100644 --- a/app/views/status_messages/new.html.haml +++ b/app/views/status_messages/new.html.haml @@ -12,6 +12,7 @@ Publisher.autocompletion.onSelect($("#status_message_fake_text"),person,'#{@person.name}'); $("#publisher #status_message_fake_text").val(function(index, value){ return value + " " }); $("#publisher").bind('ajax:success', function(){location.reload();}); + Publisher.bookmarklet =true; Publisher.open(); }); diff --git a/features/mentions_from_profile_page.feature b/features/mentions_from_profile_page.feature index dec5bda6c..3487302df 100644 --- a/features/mentions_from_profile_page.feature +++ b/features/mentions_from_profile_page.feature @@ -25,8 +25,9 @@ Feature: mentioning a contact from their profile page And I expand the publisher in the modal window And I append "I am eating a yogurt" to the publisher And I press "Share" in the modal window - + And I wait for the ajax to finish When I am on the aspects page + And I wait for the ajax to finish And I follow "PostingTo" within "#aspect_nav" And I wait for the ajax to finish Then I should see "I am eating a yogurt" diff --git a/lib/aspect_stream.rb b/lib/aspect_stream.rb index 88e86190c..c12a7e9e4 100644 --- a/lib/aspect_stream.rb +++ b/lib/aspect_stream.rb @@ -64,7 +64,7 @@ class AspectStream end def ajax_stream? - true + for_all_aspects? end # Determine whether or not the stream is displaying across diff --git a/spec/lib/aspect_stream_spec.rb b/spec/lib/aspect_stream_spec.rb index 8fd0a860d..f08acdc47 100644 --- a/spec/lib/aspect_stream_spec.rb +++ b/spec/lib/aspect_stream_spec.rb @@ -123,4 +123,19 @@ describe AspectStream do @stream.should_not be_for_all_aspects end end + + describe '.ajax_stream?' do + before do + @stream = AspectStream.new(stub, stub) + end + it 'is true stream is for all aspects?' do + @stream.stub(:for_all_aspects?).and_return(true) + @stream.ajax_stream?.should be_true + end + + it 'is false if it is not for all aspects' do + @stream.stub(:for_all_aspects?).and_return(false) + @stream.ajax_stream?.should be_false + end + end end