e311d8f521
The board-scoped mention prompt was returning all users with board access, including those marked as inactive. This adds the `.active` scope to match the behavior of the account-wide mention prompt. Fixes https://app.fizzy.do/5986089/cards/3861
27 lines
680 B
Ruby
27 lines
680 B
Ruby
require "test_helper"
|
|
|
|
class Prompts::Boards::UsersControllerTest < ActionDispatch::IntegrationTest
|
|
setup do
|
|
sign_in_as :kevin
|
|
@board = boards(:writebook)
|
|
end
|
|
|
|
test "index" do
|
|
get prompts_board_users_path(@board)
|
|
assert_response :success
|
|
assert_select "lexxy-prompt-item", count: 3
|
|
end
|
|
|
|
test "index excludes inactive users" do
|
|
get prompts_board_users_path(@board)
|
|
assert_response :success
|
|
assert_select "lexxy-prompt-item[search*='David']", count: 1
|
|
|
|
users(:david).update!(active: false)
|
|
|
|
get prompts_board_users_path(@board)
|
|
assert_response :success
|
|
assert_select "lexxy-prompt-item[search*='David']", count: 0
|
|
end
|
|
end
|