Skip to content
Extraits de code Groupes Projets
Valider 6571ec2f rédigé par robhogg's avatar robhogg
Parcourir les fichiers

Added test for nsfw?

parent b792a6d3
Aucune branche associée trouvée
Aucune étiquette associée trouvée
Aucune requête de fusion associée trouvée
......@@ -226,6 +226,18 @@ STR
end
end
describe "#nsfw?" do
it 'returns MatchObject (true) if the post contains #nsfw (however capitalised)' do
status = Factory(:status_message, :text => "This message is #nSFw")
status.nsfw?.should be_true
end
it 'returns nil (false) if the post does not contain #nsfw' do
status = Factory(:status_message, :text => "This message is #sFW")
status.nsfw?.should be_false
end
end
describe "#notify_person" do
it 'notifies the person mentioned' do
Notification.should_receive(:notify).with(alice, anything, anything)
......
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