Skip to content
Extraits de code Groupes Projets
Valider 894af485 rédigé par Jonne Haß's avatar Jonne Haß
Parcourir les fichiers

add spec to ensure include_community_spotlight? is correctly passed into EvilQuery::MultiStream.new

parent 0fedca33
Aucune branche associée trouvée
Aucune étiquette associée trouvée
Aucune requête de fusion associée trouvée
......@@ -3,13 +3,24 @@ require Rails.root.join('spec', 'shared_behaviors', 'stream')
describe Stream::Multi do
before do
@stream = Stream::Multi.new(alice, :max_time => Time.now, :order => 'updated_at')
@stream = Stream::Multi.new(alice, :max_time => @time, :order => 'updated_at')
end
describe 'shared behaviors' do
it_should_behave_like 'it is a stream'
end
describe "#posts" do
it "calls EvilQuery::MultiStream with correct parameters" do
::EvilQuery::MultiStream.should_receive(:new)
.with(alice, 'updated_at', @stream.max_time,
AppConfig.settings.community_spotlight.enable? &&
alice.show_community_spotlight_in_stream?)
.and_return(mock.tap { |m| m.stub!(:make_relation!)})
@stream.posts
end
end
describe '#publisher_opts' do
it 'prefills, sets public, and autoexpands if welcome? is set' do
prefill_text = "sup?"
......
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