green jasmine by stubbing ajax_stream? in aspects controller
This commit is contained in:
parent
9760033fa5
commit
6ac0a46120
4 changed files with 9 additions and 2 deletions
|
|
@ -23,7 +23,7 @@
|
|||
= render 'aspects/no_contacts_message'
|
||||
|
||||
#main_stream.stream{:data => {:guids => stream.aspect_ids.join(',')}}
|
||||
- if defined?(no_posts) && no_posts
|
||||
- if stream.ajax_stream?
|
||||
#pagination
|
||||
=link_to(t('more'), next_page_path(:ajax_stream => true), :class => 'paginate')
|
||||
|
||||
|
|
|
|||
|
|
@ -26,7 +26,7 @@
|
|||
|
||||
.span-13.append-1
|
||||
#aspect_stream_container.stream_container
|
||||
= render 'aspects/aspect_stream', :stream => @stream, :no_posts => true
|
||||
= render 'aspects/aspect_stream', :stream => @stream
|
||||
|
||||
.span-5.rightBar.last
|
||||
= render 'aspects/selected_contacts', :stream => @stream
|
||||
|
|
|
|||
|
|
@ -63,6 +63,10 @@ class AspectStream
|
|||
end
|
||||
end
|
||||
|
||||
def ajax_stream?
|
||||
true
|
||||
end
|
||||
|
||||
# Determine whether or not the stream is displaying across
|
||||
# all of the user's aspects.
|
||||
#
|
||||
|
|
|
|||
|
|
@ -67,6 +67,9 @@ describe AspectsController do
|
|||
|
||||
describe "#index" do
|
||||
context 'jasmine fixtures' do
|
||||
before do
|
||||
AspectStream.any_instance.stub(:ajax_stream?).and_return(false)
|
||||
end
|
||||
it "generates a jasmine fixture", :fixture => true do
|
||||
get :index
|
||||
save_fixture(html_for("body"), "aspects_index")
|
||||
|
|
|
|||
Loading…
Reference in a new issue