We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 8e0b9fb commit bd8bf74Copy full SHA for bd8bf74
1 file changed
test/controllers/pinned_links_controller_test.rb
@@ -3,6 +3,21 @@
3
class PinnedLinksControllerTest < ActionController::TestCase
4
include Devise::Test::ControllerHelpers
5
6
+ test ':index should correctly filter byt activity status' do
7
+ sign_in users(:moderator)
8
+
9
+ get :index, params: { filter: 'all' }
10
+ assert_response(:success)
11
+ assert assigns(:links).any?
12
13
+ get :index, params: { filter: 'inactive' }
14
+ @links = assigns(:links)
15
16
17
+ assert @links.any?
18
+ assert @links.none?(&:active?)
19
+ end
20
21
test 'only mods or higher should be able to see pinned links' do
22
users.each do |user|
23
sign_in user
0 commit comments