Skip to content
Extraits de code Groupes Projets
Valider 621075d4 rédigé par Maxwell Salzberg's avatar Maxwell Salzberg
Parcourir les fichiers

fix mentioning from profile page spec, add some tests for the ajax_stream? method

parent a99d9927
Aucune branche associée trouvée
Aucune étiquette associée trouvée
Aucune requête de fusion associée trouvée
......@@ -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
......
......@@ -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();
});
......
......@@ -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"
......
......@@ -64,7 +64,7 @@ class AspectStream
end
def ajax_stream?
true
for_all_aspects?
end
# Determine whether or not the stream is displaying across
......
......@@ -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
0% Chargement en cours ou .
You are about to add 0 people to the discussion. Proceed with caution.
Terminez d'abord l'édition de ce message.
Veuillez vous inscrire ou vous pour commenter