Files
fizzy/test/models/command/go_to_user_test.rb
T
Jorge Manrubia 39c7a54ad6 Add /user command
The LLM was relying on it. Having it missing resulted in a stack overflow error!

https://fizzy.37signals.com/5986089/collections/7/cards/1135
2025-07-18 17:59:02 +02:00

23 lines
562 B
Ruby

require "test_helper"
class Command::GoToUserTest < ActionDispatch::IntegrationTest
include CommandTestHelper
test "redirect to the user perma with @" do
result = execute_command "@kevin"
assert_equal user_path(users(:kevin)), result.url
end
test "redirect to the user perma with /user" do
result = execute_command "/user kevin"
assert_equal user_path(users(:kevin)), result.url
end
test "result in an invalid command if the user does not exist" do
command = parse_command "@not_a_user"
assert !command.valid?
end
end