fix mentioning from profile page spec, add some tests for the ajax_stream? method
This commit is contained in:
parent
a99d992706
commit
621075d4e1
5 changed files with 19 additions and 3 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Reference in a new issue