mirror of
https://github.com/we-promise/sure.git
synced 2026-04-07 14:31:25 +00:00
* First cut of a simplified "intro" UI layout * Linter * Add guest role and intro-only access * Fix guest role UI defaults (#940) Use enum predicate to avoid missing role helper. * Remove legacy user role mapping (#941) Drop the unused user role references in role normalization and SSO role mapping forms to avoid implying a role that never existed. Refs: #0 * Remove role normalization (#942) Remove role normalization Roles are now stored directly without legacy mappings. * Revert role mapping logic * Remove `normalize_role_settings` * Remove unnecessary migration * Make `member` the default * Broken `.erb` --------- Signed-off-by: Juan José Mata <juanjo.mata@gmail.com>
22 lines
574 B
Ruby
22 lines
574 B
Ruby
require "test_helper"
|
|
|
|
class AssistantConfigurableTest < ActiveSupport::TestCase
|
|
test "returns dashboard configuration by default" do
|
|
chat = chats(:one)
|
|
|
|
config = Assistant.config_for(chat)
|
|
|
|
assert_not_empty config[:functions]
|
|
assert_includes config[:instructions], "You help users understand their financial data"
|
|
end
|
|
|
|
test "returns intro configuration without functions" do
|
|
chat = chats(:intro)
|
|
|
|
config = Assistant.config_for(chat)
|
|
|
|
assert_equal [], config[:functions]
|
|
assert_includes config[:instructions], "stage of life"
|
|
end
|
|
end
|