Rename file

This commit is contained in:
Jorge Manrubia
2025-07-22 19:14:07 +02:00
parent 493d517a0c
commit e6004047fc
@@ -0,0 +1,35 @@
require "test_helper"
class Admin::PromptSandboxesControllerTest < ActionDispatch::IntegrationTest
setup do
sign_in_as :kevin
end
test "show renders the form with default prompt" do
get admin_prompt_sandbox_path
assert_response :success
end
test "create processes prompt and renders show with summary" do
post admin_prompt_sandbox_path, params: { prompt: "Test prompt for summarization" }
assert_response :success
end
test "non-staff user gets forbidden on show" do
users(:kevin).update! email_address: "kevin@hey.com"
get admin_prompt_sandbox_path
assert_response :forbidden
end
test "non-staff user gets forbidden on create" do
users(:kevin).update! email_address: "kevin@hey.com"
post admin_prompt_sandbox_path, params: { prompt: "Test prompt for summarization" }
assert_response :forbidden
end
end