File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 33class PinnedLinksControllerTest < ActionController ::TestCase
44 include Devise ::Test ::ControllerHelpers
55
6+ test 'only mods or higher should be able to see pinned links' do
7+ users . each do |user |
8+ sign_in user
9+ get :index
10+
11+ assert_response ( user . at_least_moderator? ? :success : :not_found )
12+ end
13+ end
14+
615 test 'only mods or higher should be able to create pinned links' do
716 post = posts ( :question_one )
817
@@ -61,7 +70,7 @@ class PinnedLinksControllerTest < ActionController::TestCase
6170 assert_equal 'updated label' , assigns ( :link ) . label
6271 end
6372
64- test 'update should correctly handle invlid pinned links' do
73+ test 'update should correctly handle invalid pinned links' do
6574 sign_in users ( :moderator )
6675 try_update_pinned_link ( pinned_links ( :active_with_label ) , link : nil )
6776 assert_response ( :bad_request )
You can’t perform that action at this time.
0 commit comments