From 6589d39966317ffc4902d7c35ce4b025a9602b3c Mon Sep 17 00:00:00 2001 From: Rishabh Singh Date: Sat, 17 Feb 2018 05:17:57 +0530 Subject: [PATCH] Added functional test for subscribing to a tag. (#2286) --- test/functional/subscription_controller_test.rb | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/test/functional/subscription_controller_test.rb b/test/functional/subscription_controller_test.rb index 324fcde9d8..7f7d938943 100644 --- a/test/functional/subscription_controller_test.rb +++ b/test/functional/subscription_controller_test.rb @@ -5,7 +5,15 @@ class SubscriptionControllerTest < ActionController::TestCase def setup activate_authlogic end + + test 'user should be able to subscribe to a tag' do + UserSession.create(users(:bob)) + get :add, type: 'tag', name: 'blog' + assert_response :redirect + assert users(:bob).following(:blog) + end + test 'should redirect to login if user is not logged in and trying to access digest' do get :digest