Skip to content
Extraits de code Groupes Projets
Valider 1d37c139 rédigé par Sarah Mei's avatar Sarah Mei
Parcourir les fichiers

Fix tag stream spec to reflect the different set of people count methods.

parent a3dce03f
Aucune branche associée trouvée
Aucune étiquette associée trouvée
Aucune requête de fusion associée trouvée
......@@ -55,13 +55,21 @@ describe Stream::Tag do
end
end
describe 'people' do
it "assigns the right set of people" do
describe "people" do
it "assigns the set of people who authored a post containing the tag" do
alice.post(:status_message, :text => "#what", :public => true, :to => 'all')
stream = Stream::Tag.new(nil, "what")
stream.people.should == [alice.person]
end
end
describe 'tagged_people' do
it "assigns the set of people who have that tag in their profile tags" do
stream = Stream::Tag.new(bob, "whatevs")
alice.profile.tag_string = "#whatevs"
alice.profile.build_tags
alice.profile.save!
stream.people.should == [alice.person]
stream.tagged_people.should == [alice.person]
end
end
......
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