Skip to content
Extraits de code Groupes Projets
Valider 3ebc0f03 rédigé par Erwan Guyader's avatar Erwan Guyader
Parcourir les fichiers

Test returned path for Show More on mobile

  - Added test when the currant page is Aspects Stream
  - Modified test for the Stream page to account for the new possibility
    (i.e current page is Aspects Stream)
parent e804f308
Aucune branche associée trouvée
Aucune étiquette associée trouvée
Aucune requête de fusion associée trouvée
...@@ -19,13 +19,21 @@ describe StreamHelper do ...@@ -19,13 +19,21 @@ describe StreamHelper do
end end
it 'works for stream page when current page is stream' do it 'works for stream page when current page is stream' do
helper.stub(:current_page?).and_return(true) helper.stub(:current_page?).and_return(false)
helper.should_receive(:current_page?).with(:stream).and_return(true)
helper.stub(:controller).and_return(build_controller(StreamsController)) helper.stub(:controller).and_return(build_controller(StreamsController))
helper.next_page_path.should include stream_path helper.next_page_path.should include stream_path
end end
it 'works for activity page when current page is not stream' do it 'works for aspects page when current page is aspects' do
helper.stub("current_page?").and_return(false) helper.stub(:current_page?).and_return(false)
helper.should_receive(:current_page?).with(:aspects_stream).and_return(true)
helper.stub(:controller).and_return(build_controller(StreamsController))
helper.next_page_path.should include aspects_stream_path
end
it 'works for activity page when current page is not stream or aspects' do
helper.stub(:current_page?).and_return(false)
helper.stub(:controller).and_return(build_controller(StreamsController)) helper.stub(:controller).and_return(build_controller(StreamsController))
# binding.pry # binding.pry
helper.next_page_path.should include activity_stream_path helper.next_page_path.should include activity_stream_path
......
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