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

green jasmine by stubbing ajax_stream? in aspects controller

parent 9760033f
Branches
Étiquettes
Aucune requête de fusion associée trouvée
...@@ -23,7 +23,7 @@ ...@@ -23,7 +23,7 @@
= render 'aspects/no_contacts_message' = render 'aspects/no_contacts_message'
#main_stream.stream{:data => {:guids => stream.aspect_ids.join(',')}} #main_stream.stream{:data => {:guids => stream.aspect_ids.join(',')}}
- if defined?(no_posts) && no_posts - if stream.ajax_stream?
#pagination #pagination
=link_to(t('more'), next_page_path(:ajax_stream => true), :class => 'paginate') =link_to(t('more'), next_page_path(:ajax_stream => true), :class => 'paginate')
......
...@@ -26,7 +26,7 @@ ...@@ -26,7 +26,7 @@
.span-13.append-1 .span-13.append-1
#aspect_stream_container.stream_container #aspect_stream_container.stream_container
= render 'aspects/aspect_stream', :stream => @stream, :no_posts => true = render 'aspects/aspect_stream', :stream => @stream
.span-5.rightBar.last .span-5.rightBar.last
= render 'aspects/selected_contacts', :stream => @stream = render 'aspects/selected_contacts', :stream => @stream
......
...@@ -63,6 +63,10 @@ class AspectStream ...@@ -63,6 +63,10 @@ class AspectStream
end end
end end
def ajax_stream?
true
end
# Determine whether or not the stream is displaying across # Determine whether or not the stream is displaying across
# all of the user's aspects. # all of the user's aspects.
# #
......
...@@ -67,6 +67,9 @@ describe AspectsController do ...@@ -67,6 +67,9 @@ describe AspectsController do
describe "#index" do describe "#index" do
context 'jasmine fixtures' 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 it "generates a jasmine fixture", :fixture => true do
get :index get :index
save_fixture(html_for("body"), "aspects_index") save_fixture(html_for("body"), "aspects_index")
......
0% Chargement en cours ou .
You are about to add 0 people to the discussion. Proceed with caution.
Veuillez vous inscrire ou vous pour commenter