mirror of
https://github.com/we-promise/sure.git
synced 2026-04-19 03:54:08 +00:00
Allow disabling AI assistant (#146)
* Test disabling AI assistant * Leave "Maybe" out of it * It's "sure" now
This commit is contained in:
19
test/system/settings/ai_prompts_test.rb
Normal file
19
test/system/settings/ai_prompts_test.rb
Normal file
@@ -0,0 +1,19 @@
|
||||
require "application_system_test_case"
|
||||
|
||||
class Settings::AiPromptsTest < ApplicationSystemTestCase
|
||||
setup do
|
||||
@user = users(:family_admin)
|
||||
@user.update!(ai_enabled: true)
|
||||
login_as @user
|
||||
end
|
||||
|
||||
test "user can disable ai assistant" do
|
||||
visit settings_ai_prompts_path
|
||||
|
||||
click_button "Disable AI Assistant"
|
||||
|
||||
assert_current_path settings_ai_prompts_path
|
||||
@user.reload
|
||||
assert_not @user.ai_enabled?
|
||||
end
|
||||
end
|
||||
Reference in New Issue
Block a user