Skip to content

Commit

Permalink
Added functional test for subscribing to a tag. (publiclab#2286)
Browse files Browse the repository at this point in the history
  • Loading branch information
rishabhptr authored and Souravirus committed Mar 12, 2018
1 parent 7d6620e commit 6589d39
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions test/functional/subscription_controller_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down

0 comments on commit 6589d39

Please sign in to comment.