Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/diaspora/diaspora.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/spec
diff options
context:
space:
mode:
authorIlya Zhitomirskiy <iz268@nyu.edu>2011-10-18 10:26:52 +0400
committerdanielgrippi <danielgrippi@gmail.com>2011-10-25 01:11:34 +0400
commitc7838debcfbb4c4999aa7e27b673b6b26263a3d4 (patch)
tree998371a3922d13ce9f44a4292cf22a3e48a3a358 /spec
parent511bd3ab03b2705a419d80cd3db5bd9572248887 (diff)
creating multiple tag_followings
Diffstat (limited to 'spec')
-rw-r--r--spec/controllers/tag_followings_controller_spec.rb22
1 files changed, 22 insertions, 0 deletions
diff --git a/spec/controllers/tag_followings_controller_spec.rb b/spec/controllers/tag_followings_controller_spec.rb
index 040bef8e3..f3a9609f3 100644
--- a/spec/controllers/tag_followings_controller_spec.rb
+++ b/spec/controllers/tag_followings_controller_spec.rb
@@ -102,4 +102,26 @@ describe TagFollowingsController do
end
end
+ describe "#create_multiple" do
+ it "adds multiple tags" do
+ lambda{
+ post :create_multiple, :tags => "#tags,#cats,#bats,"
+ }.should change{
+ bob.followed_tags.count
+ }.by(3)
+ end
+
+ it "adds non-followed tags" do
+ TagFollowing.create!(:tag => @tag, :user => bob )
+
+ lambda{
+ post :create_multiple, :tags => "#partytimeexcellent,#cats,#bats,"
+ }.should change{
+ bob.followed_tags.count
+ }.by(2)
+
+ response.should be_redirect
+ end
+ end
+
end