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
diff options
context:
space:
mode:
Diffstat (limited to 'spec/controllers/tag_followings_controller_spec.rb')
-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