+
+ # Viewing an active block should work, but shouldn't mark it as seen
+ get :show, :id => user_blocks(:active_block)
+ assert_response :success
+ assert_equal true, UserBlock.find(user_blocks(:active_block).id).needs_view
+
+ # Login as the blocked user
+ session[:user] = users(:blocked_user).id
+ cookies["_osm_username"] = users(:blocked_user).display_name
+
+ # Now viewing it should mark it as seen
+ get :show, :id => user_blocks(:active_block)
+ assert_response :success
+ assert_equal false, UserBlock.find(user_blocks(:active_block).id).needs_view