"No","テストID","対象クラス","対象メソッド","テスト観点","テストケース名","前提条件","入力値","期待結果","優先度","備考"
"1","UT-ENT-001","AccountSamlSettings","belongs_to :account","正常系","accountリレーションが正しく取得できること","AccountSamlSettingsとAccountが存在","account_id=有効なアカウントID","関連するAccountオブジェクトが返却される","高","SAML認証設定の基本リレーション"
"2","UT-ENT-002","AccountSamlSettings","validates :account_id","異常系","account_idがnilの場合バリデーションエラーになること","なし","account_id=nil","presenceエラーが発生する","高","必須項目の検証"
"3","UT-ENT-003","AccountSamlSettings","validates :sso_url","異常系","sso_urlがnilの場合バリデーションエラーになること","なし","sso_url=nil","presenceエラーが発生する","高","SSO URL必須"
"4","UT-ENT-004","AccountSamlSettings","validates :certificate","異常系","certificateがnilの場合バリデーションエラーになること","なし","certificate=nil","presenceエラーが発生する","高","証明書必須"
"5","UT-ENT-005","AccountSamlSettings","validates :idp_entity_id","異常系","idp_entity_idがnilの場合バリデーションエラーになること","なし","idp_entity_id=nil","presenceエラーが発生する","高","IdPエンティティID必須"
"6","UT-ENT-006","AccountSamlSettings","certificate_must_be_valid_x509","正常系","有効なX509証明書が受け入れられること","なし","certificate=有効なX509証明書文字列","バリデーションエラーなし","高","証明書形式の検証"
"7","UT-ENT-007","AccountSamlSettings","certificate_must_be_valid_x509","異常系","無効な証明書文字列の場合エラーになること","なし","certificate=""invalid_cert""","certificateにエラーが追加される","高","不正な証明書の拒否"
"8","UT-ENT-008","AccountSamlSettings","saml_enabled?","正常系","sso_urlとcertificateが存在する場合trueを返すこと","sso_urlとcertificateが設定済み","なし","trueが返却される","中","SAML有効状態の判定"
"9","UT-ENT-009","AccountSamlSettings","saml_enabled?","境界値","sso_urlが空の場合falseを返すこと","certificateのみ設定済み","sso_url=""""","falseが返却される","中","部分設定時の無効判定"
"10","UT-ENT-010","AccountSamlSettings","saml_enabled?","境界値","certificateが空の場合falseを返すこと","sso_urlのみ設定済み","certificate=""""","falseが返却される","中","部分設定時の無効判定"
"11","UT-ENT-011","AccountSamlSettings","certificate_fingerprint","正常系","有効な証明書のフィンガープリントが返却されること","有効なX509証明書が設定済み","なし","SHA1フィンガープリント文字列（コロン区切り大文字16進数）","中","証明書識別用"
"12","UT-ENT-012","AccountSamlSettings","certificate_fingerprint","境界値","certificateがnilの場合nilを返すこと","なし","certificate=nil","nilが返却される","中","null安全性"
"13","UT-ENT-013","AccountSamlSettings","certificate_fingerprint","異常系","無効な証明書の場合nilを返すこと","なし","certificate=""invalid""","nilが返却される","中","エラーハンドリング"
"14","UT-ENT-014","AccountSamlSettings","set_sp_entity_id","正常系","sp_entity_idが空の場合自動生成されること","sp_entity_id未設定","account_id=123","sp_entity_idが""http://localhost:3000/saml/sp/123""形式で設定される","中","SP Entity IDの自動生成"
"15","UT-ENT-015","AccountSamlSettings","set_sp_entity_id","境界値","sp_entity_idが既に設定済みの場合変更されないこと","sp_entity_id=""existing_id""","なし","sp_entity_idが変更されない","低","既存値の保持"
"16","UT-ENT-016","AccountSamlSettings","update_account_users_provider","正常系","作成後にSaml::UpdateAccountUsersProviderJobがenqueueされること","なし","有効なAccountSamlSettingsデータ","ジョブがenqueueされる（provider=""saml""）","高","ユーザープロバイダ更新"
"17","UT-ENT-017","AccountSamlSettings","reset_account_users_provider","正常系","削除後にSaml::UpdateAccountUsersProviderJobがenqueueされること","AccountSamlSettingsが存在","destroyを実行","ジョブがenqueueされる（provider=""email""）","高","ユーザープロバイダリセット"
"18","UT-ENT-018","AgentCapacityPolicy","belongs_to :account","正常系","accountリレーションが正しく取得できること","AgentCapacityPolicyとAccountが存在","account_id=有効なアカウントID","関連するAccountオブジェクトが返却される","高","基本リレーション"
"19","UT-ENT-019","AgentCapacityPolicy","has_many :inbox_capacity_limits","正常系","inbox_capacity_limitsリレーションが正しく取得できること","関連するInboxCapacityLimitが存在","なし","関連するInboxCapacityLimitのコレクションが返却される","高","受信箱制限の取得"
"20","UT-ENT-020","AgentCapacityPolicy","has_many :inbox_capacity_limits","正常系","dependent: :destroyで関連レコードも削除されること","関連するInboxCapacityLimitが存在","AgentCapacityPolicyを削除","関連するInboxCapacityLimitも削除される","高","カスケード削除"
"21","UT-ENT-021","AgentCapacityPolicy","has_many :inboxes","正常系","inboxesがthrough関連で取得できること","InboxCapacityLimitを経由した関連が存在","なし","関連するInboxのコレクションが返却される","中","through関連"
"22","UT-ENT-022","AgentCapacityPolicy","has_many :account_users","正常系","account_usersリレーションが正しく取得できること","関連するAccountUserが存在","なし","関連するAccountUserのコレクションが返却される","中","ユーザー割り当て"
"23","UT-ENT-023","AgentCapacityPolicy","has_many :account_users","正常系","dependent: :nullifyで関連レコードの外部キーがnullになること","関連するAccountUserが存在","AgentCapacityPolicyを削除","AccountUserのagent_capacity_policy_idがnullになる","中","nullify動作"
"24","UT-ENT-024","AgentCapacityPolicy","validates :name","異常系","nameがnilの場合バリデーションエラーになること","なし","name=nil","presenceエラーが発生する","高","必須項目"
"25","UT-ENT-025","AgentCapacityPolicy","validates :name","境界値","nameが255文字の場合バリデーション成功すること","なし","name=""a"" * 255","バリデーションエラーなし","中","最大長境界値"
"26","UT-ENT-026","AgentCapacityPolicy","validates :name","境界値","nameが256文字の場合バリデーションエラーになること","なし","name=""a"" * 256","lengthエラーが発生する","中","最大長超過"
"27","UT-ENT-027","AgentCapacityPolicy","validates :account","異常系","accountがnilの場合バリデーションエラーになること","なし","account=nil","presenceエラーが発生する","高","必須項目"
"28","UT-ENT-028","AppliedSla","belongs_to :account","正常系","accountリレーションが正しく取得できること","AppliedSlaとAccountが存在","account_id=有効なアカウントID","関連するAccountオブジェクトが返却される","高","基本リレーション"
"29","UT-ENT-029","AppliedSla","belongs_to :sla_policy","正常系","sla_policyリレーションが正しく取得できること","関連するSlaPolicyが存在","sla_policy_id=有効なID","関連するSlaPolicyオブジェクトが返却される","高","SLAポリシー参照"
"30","UT-ENT-030","AppliedSla","belongs_to :conversation","正常系","conversationリレーションが正しく取得できること","関連するConversationが存在","conversation_id=有効なID","関連するConversationオブジェクトが返却される","高","会話参照"
"31","UT-ENT-031","AppliedSla","has_many :sla_events","正常系","sla_eventsリレーションが正しく取得できること","関連するSlaEventが存在","なし","関連するSlaEventのコレクションが返却される","高","SLAイベント取得"
"32","UT-ENT-032","AppliedSla","validates :account_id uniqueness","異常系","同一account/sla_policy/conversationの組み合わせが重複する場合エラーになること","同一組み合わせのAppliedSlaが存在","重複するaccount_id/sla_policy_id/conversation_id","uniquenessエラーが発生する","高","ユニーク制約"
"33","UT-ENT-033","AppliedSla","enum sla_status","正常系","sla_status=activeが正しく設定されること","なし","sla_status=:active","sla_statusが0として保存される","中","enumマッピング"
"34","UT-ENT-034","AppliedSla","enum sla_status","正常系","sla_status=hitが正しく設定されること","なし","sla_status=:hit","sla_statusが1として保存される","中","enumマッピング"
"35","UT-ENT-035","AppliedSla","enum sla_status","正常系","sla_status=missedが正しく設定されること","なし","sla_status=:missed","sla_statusが2として保存される","中","enumマッピング"
"36","UT-ENT-036","AppliedSla","enum sla_status","正常系","sla_status=active_with_missesが正しく設定されること","なし","sla_status=:active_with_misses","sla_statusが3として保存される","中","enumマッピング"
"37","UT-ENT-037","AppliedSla","scope :filter_by_date_range","正常系","日付範囲でフィルタリングできること","複数のAppliedSlaが存在（異なる作成日）","range=1.week.ago..Time.current","指定範囲内のレコードのみ返却される","中","日付フィルタ"
"38","UT-ENT-038","AppliedSla","scope :filter_by_date_range","境界値","rangeがnilの場合全件返却されること","複数のAppliedSlaが存在","range=nil","全レコードが返却される","低","null安全性"
"39","UT-ENT-039","AppliedSla","scope :filter_by_inbox_id","正常系","inbox_idでフィルタリングできること","複数のAppliedSlaが存在（異なるinbox）","inbox_id=有効なID","指定inbox_idに関連するレコードのみ返却される","中","受信箱フィルタ"
"40","UT-ENT-040","AppliedSla","scope :filter_by_team_id","正常系","team_idでフィルタリングできること","複数のAppliedSlaが存在（異なるteam）","team_id=有効なID","指定team_idに関連するレコードのみ返却される","中","チームフィルタ"
"41","UT-ENT-041","AppliedSla","scope :filter_by_sla_policy_id","正常系","sla_policy_idでフィルタリングできること","複数のAppliedSlaが存在（異なるsla_policy）","sla_policy_id=有効なID","指定sla_policy_idのレコードのみ返却される","中","ポリシーフィルタ"
"42","UT-ENT-042","AppliedSla","scope :filter_by_label_list","正常系","label_listでフィルタリングできること","cached_label_listに""urgent""を含む会話が存在","label_list=""urgent""","該当ラベルを含むレコードのみ返却される","中","ラベルフィルタ"
"43","UT-ENT-043","AppliedSla","scope :filter_by_assigned_agent_id","正常系","assigned_agent_idでフィルタリングできること","assignee_idが設定された会話が存在","assigned_agent_id=有効なID","該当エージェントに割り当てられたレコードのみ返却される","中","エージェントフィルタ"
"44","UT-ENT-044","AppliedSla","scope :missed","正常系","missed/active_with_missesステータスのレコードが返却されること","各ステータスのAppliedSlaが存在","なし","sla_statusがmissedまたはactive_with_missesのレコードのみ返却される","高","SLAミス抽出"
"45","UT-ENT-045","AppliedSla","push_event_data","正常系","イベントデータが正しい形式で返却されること","AppliedSlaとSlaPolicyが存在","なし","id/sla_id/sla_status/created_at/updated_at/sla_*を含むハッシュ","中","イベント通知用データ"
"46","UT-ENT-046","AppliedSla","push_conversation_event","正常系","sla_statusが変更された場合にdispatch_conversation_updated_eventが呼ばれること","AppliedSlaが存在","sla_statusをactiveからhitに変更","conversation.dispatch_conversation_updated_eventが呼ばれる","高","イベント発火"
"47","UT-ENT-047","AppliedSla","push_conversation_event","境界値","sla_statusが変更されない場合イベントが発火しないこと","AppliedSlaが存在","他の属性のみ変更","dispatch_conversation_updated_eventが呼ばれない","中","不要なイベント抑制"
"48","UT-ENT-048","AppliedSla","ensure_account_id","正常系","account_idが未設定の場合sla_policyから取得されること","sla_policyが設定済み","account_id=nil","sla_policy.account_idが設定される","中","自動補完"
"49","UT-ENT-049","ArticleEmbedding","belongs_to :article","正常系","articleリレーションが正しく取得できること","ArticleEmbeddingとArticleが存在","article_id=有効なID","関連するArticleオブジェクトが返却される","高","記事参照"
"50","UT-ENT-050","ArticleEmbedding","has_neighbors :embedding","正常系","embeddingカラムでneighbor検索が利用できること","複数のArticleEmbeddingが存在","embedding=ベクトル値","類似したembeddingを持つレコードが返却される","高","ベクトル検索"
"51","UT-ENT-051","ArticleEmbedding","delegate :account_id","正常系","account_idがarticleから委譲されること","ArticleとAccountが存在","なし","article.account_idが返却される","中","委譲メソッド"
"52","UT-ENT-052","ArticleEmbedding","update_response_embedding","正常系","termが変更された場合にUpdateEmbeddingJobがenqueueされること","ArticleEmbeddingが存在","termを変更して保存","Captain::Llm::UpdateEmbeddingJobがenqueueされる","高","埋め込み更新"
"53","UT-ENT-053","ArticleEmbedding","update_response_embedding","正常系","embeddingがnilの場合にUpdateEmbeddingJobがenqueueされること","embedding=nilのArticleEmbeddingが存在","保存","Captain::Llm::UpdateEmbeddingJobがenqueueされる","高","初回埋め込み生成"
"54","UT-ENT-054","ArticleEmbedding","update_response_embedding","境界値","termが変更されずembeddingが存在する場合ジョブがenqueueされないこと","termとembeddingが設定済み","他の属性のみ変更","ジョブがenqueueされない","中","不要なジョブ抑制"
"55","UT-ENT-055","CaptainInbox","belongs_to :captain_assistant","正常系","captain_assistantリレーションが正しく取得できること","CaptainInboxとCaptain::Assistantが存在","captain_assistant_id=有効なID","関連するCaptain::Assistantオブジェクトが返却される","高","アシスタント参照"
"56","UT-ENT-056","CaptainInbox","belongs_to :inbox","正常系","inboxリレーションが正しく取得できること","CaptainInboxとInboxが存在","inbox_id=有効なID","関連するInboxオブジェクトが返却される","高","受信箱参照"
"57","UT-ENT-057","CaptainInbox","validates :inbox_id uniqueness","異常系","同一inbox_idが重複する場合エラーになること","同一inbox_idのCaptainInboxが存在","重複するinbox_id","uniquenessエラーが発生する","高","1対1制約"
"58","UT-ENT-058","CaptainInbox","validates :inbox_id uniqueness","正常系","異なるinbox_idであれば作成できること","CaptainInboxが存在","異なるinbox_id","バリデーションエラーなし","中","正常作成"
"59","UT-ENT-059","Company","include Avatarable","正常系","Avatarableモジュールのメソッドが利用できること","Companyが存在","なし","avatar関連メソッドが利用可能","中","Mixin確認"
"60","UT-ENT-060","Company","validates :account_id","異常系","account_idがnilの場合バリデーションエラーになること","なし","account_id=nil","presenceエラーが発生する","高","必須項目"
"61","UT-ENT-061","Company","validates :name","異常系","nameがnilの場合バリデーションエラーになること","なし","name=nil","presenceエラーが発生する","高","必須項目"
"62","UT-ENT-062","Company","validates :name","境界値","nameがCOMPANY_NAME_LENGTH_LIMITを超える場合エラーになること","なし","name=制限を超える長さの文字列","lengthエラーが発生する","中","最大長超過"
"63","UT-ENT-063","Company","validates :domain","正常系","有効なドメイン形式が受け入れられること","なし","domain=""example.com""","バリデーションエラーなし","中","ドメイン形式"
"64","UT-ENT-064","Company","validates :domain","異常系","無効なドメイン形式の場合エラーになること","なし","domain=""invalid_domain""","formatエラーが発生する","中","不正ドメイン拒否"
"65","UT-ENT-065","Company","validates :domain","異常系","ハイフンで始まるドメインの場合エラーになること","なし","domain=""-example.com""","formatエラーが発生する","中","不正ドメイン拒否"
"66","UT-ENT-066","Company","validates :domain uniqueness","異常系","同一account内で同じdomainが重複する場合エラーになること","同一accountに同じdomainのCompanyが存在","重複するdomain","uniquenessエラーが発生する","高","ユニーク制約"
"67","UT-ENT-067","Company","validates :domain uniqueness","正常系","domainがnilの場合はユニーク制約が適用されないこと","同一accountにdomain=nilのCompanyが存在","domain=nil","バリデーションエラーなし","中","条件付きユニーク"
"68","UT-ENT-068","Company","validates :description","境界値","descriptionがCOMPANY_DESCRIPTION_LENGTH_LIMITを超える場合エラーになること","なし","description=制限を超える長さの文字列","lengthエラーが発生する","低","最大長超過"
"69","UT-ENT-069","Company","belongs_to :account","正常系","accountリレーションが正しく取得できること","CompanyとAccountが存在","account_id=有効なID","関連するAccountオブジェクトが返却される","高","基本リレーション"
"70","UT-ENT-070","Company","has_many :contacts","正常系","contactsリレーションが正しく取得できること","関連するContactが存在","なし","関連するContactのコレクションが返却される","高","顧客関連"
"71","UT-ENT-071","Company","has_many :contacts","正常系","dependent: :nullifyで関連レコードの外部キーがnullになること","関連するContactが存在","Companyを削除","Contactのcompany_idがnullになる","中","nullify動作"
"72","UT-ENT-072","Company","scope :ordered_by_name","正常系","名前順でソートされること","複数のCompanyが存在","なし","name昇順でソートされたコレクションが返却される","低","ソート"
"73","UT-ENT-073","Company","scope :search_by_name_or_domain","正常系","nameで部分一致検索できること","複数のCompanyが存在","query=""acme""","nameに""acme""を含むレコードが返却される","中","名前検索"
"74","UT-ENT-074","Company","scope :search_by_name_or_domain","正常系","domainで部分一致検索できること","複数のCompanyが存在","query=""example.com""","domainに""example.com""を含むレコードが返却される","中","ドメイン検索"
"75","UT-ENT-075","Company","scope :order_on_contacts_count","正常系","contacts_countで昇順ソートできること","複数のCompanyが存在（異なるcontacts_count）","direction=""ASC""","contacts_count昇順でソートされる","低","カウントソート"
"76","UT-ENT-076","Company","scope :order_on_contacts_count","正常系","contacts_countで降順ソートできること","複数のCompanyが存在（異なるcontacts_count）","direction=""DESC""","contacts_count降順でソートされる（NULLは最後）","低","カウントソート"
"77","UT-ENT-077","CopilotMessage","belongs_to :copilot_thread","正常系","copilot_threadリレーションが正しく取得できること","CopilotMessageとCopilotThreadが存在","copilot_thread_id=有効なID","関連するCopilotThreadオブジェクトが返却される","高","スレッド参照"
"78","UT-ENT-078","CopilotMessage","belongs_to :account","正常系","accountリレーションが正しく取得できること","CopilotMessageとAccountが存在","account_id=有効なID","関連するAccountオブジェクトが返却される","高","基本リレーション"
"79","UT-ENT-079","CopilotMessage","enum message_type","正常系","message_type=userが正しく設定されること","なし","message_type=:user","message_typeが0として保存される","中","enumマッピング"
"80","UT-ENT-080","CopilotMessage","enum message_type","正常系","message_type=assistantが正しく設定されること","なし","message_type=:assistant","message_typeが1として保存される","中","enumマッピング"
"81","UT-ENT-081","CopilotMessage","enum message_type","正常系","message_type=assistant_thinkingが正しく設定されること","なし","message_type=:assistant_thinking","message_typeが2として保存される","中","enumマッピング"
"82","UT-ENT-082","CopilotMessage","validates :message_type","異常系","message_typeがnilの場合バリデーションエラーになること","なし","message_type=nil","presenceエラーが発生する","高","必須項目"
"83","UT-ENT-083","CopilotMessage","validates :message","異常系","messageがnilの場合バリデーションエラーになること","なし","message=nil","presenceエラーが発生する","高","必須項目"
"84","UT-ENT-084","CopilotMessage","validate_message_attributes","正常系","許可されたキーのみを含むmessageが受け入れられること","なし","message={""content"": ""test""}","バリデーションエラーなし","中","メッセージ形式"
"85","UT-ENT-085","CopilotMessage","validate_message_attributes","正常系","全許可キーを含むmessageが受け入れられること","なし","message={""content"": """", ""reasoning"": """", ""function_name"": """", ""reply_suggestion"": """"}","バリデーションエラーなし","中","全キー許可"
"86","UT-ENT-086","CopilotMessage","validate_message_attributes","異常系","不正なキーを含むmessageの場合エラーになること","なし","message={""content"": """", ""invalid_key"": """"}","messageにエラーが追加される","中","不正キー拒否"
"87","UT-ENT-087","CopilotMessage","ensure_account","正常系","account_idがcopilot_threadから自動設定されること","copilot_threadが設定済み","account_id=nil","copilot_thread.account_idが設定される","中","自動補完"
"88","UT-ENT-088","CopilotMessage","push_event_data","正常系","イベントデータが正しい形式で返却されること","CopilotMessageが存在","なし","id/message/message_type/created_at/copilot_threadを含むハッシュ","中","イベント通知用データ"
"89","UT-ENT-089","CopilotMessage","enqueue_response_job","正常系","ResponseJobがenqueueされること","CopilotMessageが存在","conversation_id=1, user_id=1","Captain::Copilot::ResponseJobがenqueueされる","高","レスポンス生成"
"90","UT-ENT-090","CopilotMessage","broadcast_message","正常系","作成後にCOPILOT_MESSAGE_CREATEDイベントがdispatchされること","なし","有効なCopilotMessageデータ","dispatcherにイベントが送信される","高","リアルタイム通知"
"91","UT-ENT-091","CopilotThread","belongs_to :user","正常系","userリレーションが正しく取得できること","CopilotThreadとUserが存在","user_id=有効なID","関連するUserオブジェクトが返却される","高","ユーザー参照"
"92","UT-ENT-092","CopilotThread","belongs_to :account","正常系","accountリレーションが正しく取得できること","CopilotThreadとAccountが存在","account_id=有効なID","関連するAccountオブジェクトが返却される","高","基本リレーション"
"93","UT-ENT-093","CopilotThread","belongs_to :assistant","正常系","assistantリレーションが正しく取得できること","CopilotThreadとCaptain::Assistantが存在","assistant_id=有効なID","関連するCaptain::Assistantオブジェクトが返却される","高","アシスタント参照"
"94","UT-ENT-094","CopilotThread","has_many :copilot_messages","正常系","copilot_messagesリレーションが正しく取得できること","関連するCopilotMessageが存在","なし","関連するCopilotMessageのコレクションが返却される","高","メッセージ取得"
"95","UT-ENT-095","CopilotThread","has_many :copilot_messages","正常系","dependent: :destroy_asyncで関連レコードが非同期削除されること","関連するCopilotMessageが存在","CopilotThreadを削除","関連するCopilotMessageの削除ジョブがenqueueされる","中","非同期削除"
"96","UT-ENT-096","CopilotThread","validates :title","異常系","titleがnilの場合バリデーションエラーになること","なし","title=nil","presenceエラーが発生する","高","必須項目"
"97","UT-ENT-097","CopilotThread","push_event_data","正常系","イベントデータが正しい形式で返却されること","CopilotThreadが存在","なし","id/title/created_at/user/account_idを含むハッシュ","中","イベント通知用データ"
"98","UT-ENT-098","CopilotThread","previous_history","正常系","user/assistantメッセージの履歴が時系列順で返却されること","複数のCopilotMessageが存在","なし","content/roleを含むハッシュの配列（created_at昇順）","高","履歴取得"
"99","UT-ENT-099","CopilotThread","previous_history","境界値","assistant_thinkingメッセージが除外されること","assistant_thinkingタイプのメッセージが存在","なし","assistant_thinkingタイプを除く履歴が返却される","中","フィルタリング"
"100","UT-ENT-100","CopilotThread","previous_history","境界値","メッセージがない場合空配列が返却されること","メッセージなし","なし","空配列が返却される","低","空状態"
"101","UT-ENT-101","CustomRole","belongs_to :account","正常系","accountリレーションが正しく取得できること","CustomRoleとAccountが存在","account_id=有効なID","関連するAccountオブジェクトが返却される","高","基本リレーション"
"102","UT-ENT-102","CustomRole","has_many :account_users","正常系","account_usersリレーションが正しく取得できること","関連するAccountUserが存在","なし","関連するAccountUserのコレクションが返却される","高","ユーザー割り当て"
"103","UT-ENT-103","CustomRole","has_many :account_users","正常系","dependent: :nullifyで関連レコードの外部キーがnullになること","関連するAccountUserが存在","CustomRoleを削除","AccountUserのcustom_role_idがnullになる","中","nullify動作"
"104","UT-ENT-104","CustomRole","validates :name","異常系","nameがnilの場合バリデーションエラーになること","なし","name=nil","presenceエラーが発生する","高","必須項目"
"105","UT-ENT-105","CustomRole","validates :permissions","正常系","有効なpermissionsが受け入れられること","なし","permissions=[""conversation_manage""]","バリデーションエラーなし","高","権限設定"
"106","UT-ENT-106","CustomRole","validates :permissions","正常系","複数の有効なpermissionsが受け入れられること","なし","permissions=[""conversation_manage"", ""contact_manage""]","バリデーションエラーなし","高","複数権限"
"107","UT-ENT-107","CustomRole","validates :permissions","異常系","無効なpermissionが含まれる場合エラーになること","なし","permissions=[""invalid_permission""]","inclusionエラーが発生する","高","不正権限拒否"
"108","UT-ENT-108","CustomRole","PERMISSIONS","正常系","定義されたPERMISSIONS定数が正しい値を含むこと","なし","なし","6つの権限文字列を含む配列","中","定数確認"
"109","UT-ENT-109","InboxCapacityLimit","belongs_to :agent_capacity_policy","正常系","agent_capacity_policyリレーションが正しく取得できること","InboxCapacityLimitとAgentCapacityPolicyが存在","agent_capacity_policy_id=有効なID","関連するAgentCapacityPolicyオブジェクトが返却される","高","ポリシー参照"
"110","UT-ENT-110","InboxCapacityLimit","belongs_to :inbox","正常系","inboxリレーションが正しく取得できること","InboxCapacityLimitとInboxが存在","inbox_id=有効なID","関連するInboxオブジェクトが返却される","高","受信箱参照"
"111","UT-ENT-111","InboxCapacityLimit","validates :conversation_limit","異常系","conversation_limitがnilの場合バリデーションエラーになること","なし","conversation_limit=nil","presenceエラーが発生する","高","必須項目"
"112","UT-ENT-112","InboxCapacityLimit","validates :conversation_limit","異常系","conversation_limitが0の場合バリデーションエラーになること","なし","conversation_limit=0","greater_thanエラーが発生する","高","最小値制約"
"113","UT-ENT-113","InboxCapacityLimit","validates :conversation_limit","異常系","conversation_limitが負数の場合バリデーションエラーになること","なし","conversation_limit=-1","greater_thanエラーが発生する","高","負数拒否"
"114","UT-ENT-114","InboxCapacityLimit","validates :conversation_limit","異常系","conversation_limitが小数の場合バリデーションエラーになること","なし","conversation_limit=1.5","only_integerエラーが発生する","中","整数制約"
"115","UT-ENT-115","InboxCapacityLimit","validates :conversation_limit","正常系","conversation_limitが1の場合バリデーション成功すること","なし","conversation_limit=1","バリデーションエラーなし","中","最小値境界"
"116","UT-ENT-116","InboxCapacityLimit","validates :inbox_id uniqueness","異常系","同一policy内で同じinbox_idが重複する場合エラーになること","同一policyに同じinbox_idのInboxCapacityLimitが存在","重複するinbox_id","uniquenessエラーが発生する","高","ユニーク制約"
"117","UT-ENT-117","InboxCapacityLimit","validates :inbox_id uniqueness","正常系","異なるpolicyであれば同じinbox_idでも作成できること","異なるpolicyに同じinbox_idが存在","同じinbox_id","バリデーションエラーなし","中","スコープ付きユニーク"
"118","UT-ENT-118","SlaEvent","belongs_to :account","正常系","accountリレーションが正しく取得できること","SlaEventとAccountが存在","account_id=有効なID","関連するAccountオブジェクトが返却される","高","基本リレーション"
"119","UT-ENT-119","SlaEvent","belongs_to :inbox","正常系","inboxリレーションが正しく取得できること","SlaEventとInboxが存在","inbox_id=有効なID","関連するInboxオブジェクトが返却される","高","受信箱参照"
"120","UT-ENT-120","SlaEvent","belongs_to :conversation","正常系","conversationリレーションが正しく取得できること","SlaEventとConversationが存在","conversation_id=有効なID","関連するConversationオブジェクトが返却される","高","会話参照"
"121","UT-ENT-121","SlaEvent","belongs_to :sla_policy","正常系","sla_policyリレーションが正しく取得できること","SlaEventとSlaPolicyが存在","sla_policy_id=有効なID","関連するSlaPolicyオブジェクトが返却される","高","ポリシー参照"
"122","UT-ENT-122","SlaEvent","belongs_to :applied_sla","正常系","applied_slaリレーションが正しく取得できること","SlaEventとAppliedSlaが存在","applied_sla_id=有効なID","関連するAppliedSlaオブジェクトが返却される","高","適用SLA参照"
"123","UT-ENT-123","SlaEvent","enum event_type","正常系","event_type=frtが正しく設定されること","なし","event_type=:frt","event_typeが0として保存される","中","enumマッピング（初回応答時間）"
"124","UT-ENT-124","SlaEvent","enum event_type","正常系","event_type=nrtが正しく設定されること","なし","event_type=:nrt","event_typeが1として保存される","中","enumマッピング（次回応答時間）"
"125","UT-ENT-125","SlaEvent","enum event_type","正常系","event_type=rtが正しく設定されること","なし","event_type=:rt","event_typeが2として保存される","中","enumマッピング（解決時間）"
"126","UT-ENT-126","SlaEvent","ensure_applied_sla_id","正常系","applied_sla_idが未設定の場合conversationから取得されること","conversation_idに紐づくAppliedSlaが存在","applied_sla_id=nil","該当するAppliedSlaのidが設定される","中","自動補完"
"127","UT-ENT-127","SlaEvent","ensure_account_id","正常系","account_idが未設定の場合conversationから取得されること","conversationが設定済み","account_id=nil","conversation.account_idが設定される","中","自動補完"
"128","UT-ENT-128","SlaEvent","ensure_inbox_id","正常系","inbox_idが未設定の場合conversationから取得されること","conversationが設定済み","inbox_id=nil","conversation.inbox_idが設定される","中","自動補完"
"129","UT-ENT-129","SlaEvent","ensure_sla_policy_id","正常系","sla_policy_idが未設定の場合applied_slaから取得されること","applied_slaが設定済み","sla_policy_id=nil","applied_sla.sla_policy_idが設定される","中","自動補完"
"130","UT-ENT-130","SlaEvent","push_event_data","正常系","イベントデータが正しい形式で返却されること","SlaEventが存在","なし","id/event_type/meta/created_at/updated_atを含むハッシュ","中","イベント通知用データ"
"131","UT-ENT-131","SlaEvent","create_notifications","正常系","作成後に関係者に通知が送信されること","会話参加者とアサイン担当者が存在","event_type=:frt","sla_missed_first_responseタイプの通知が作成される","高","SLAミス通知"
"132","UT-ENT-132","SlaEvent","create_notifications","正常系","nrtイベントでsla_missed_next_response通知が作成されること","会話参加者が存在","event_type=:nrt","sla_missed_next_responseタイプの通知が作成される","高","次回応答ミス通知"
"133","UT-ENT-133","SlaEvent","create_notifications","正常系","rtイベントでsla_missed_resolution通知が作成されること","会話参加者が存在","event_type=:rt","sla_missed_resolutionタイプの通知が作成される","高","解決ミス通知"
"134","UT-ENT-134","SlaEvent","create_notifications","正常系","管理者にも通知が送信されること","アカウント管理者が存在","任意のevent_type","管理者に通知が作成される","高","管理者通知"
"135","UT-ENT-135","SlaEvent","create_notifications","正常系","assigneeにも通知が送信されること","会話にassigneeが設定済み","任意のevent_type","assigneeに通知が作成される","高","担当者通知"
"136","UT-ENT-136","SlaEvent","create_notifications","境界値","重複するユーザーには1回のみ通知されること","参加者と管理者が同一ユーザー","任意のevent_type","重複なく通知が作成される","中","重複排除"
"137","UT-ENT-137","SlaPolicy","belongs_to :account","正常系","accountリレーションが正しく取得できること","SlaPolicyとAccountが存在","account_id=有効なID","関連するAccountオブジェクトが返却される","高","基本リレーション"
"138","UT-ENT-138","SlaPolicy","validates :name","異常系","nameがnilの場合バリデーションエラーになること","なし","name=nil","presenceエラーが発生する","高","必須項目"
"139","UT-ENT-139","SlaPolicy","has_many :conversations","正常系","conversationsリレーションが正しく取得できること","関連するConversationが存在","なし","関連するConversationのコレクションが返却される","高","会話参照"
"140","UT-ENT-140","SlaPolicy","has_many :conversations","正常系","dependent: :nullifyで関連レコードの外部キーがnullになること","関連するConversationが存在","SlaPolicyを削除","Conversationのsla_policy_idがnullになる","中","nullify動作"
"141","UT-ENT-141","SlaPolicy","has_many :applied_slas","正常系","applied_slasリレーションが正しく取得できること","関連するAppliedSlaが存在","なし","関連するAppliedSlaのコレクションが返却される","高","適用SLA取得"
"142","UT-ENT-142","SlaPolicy","has_many :applied_slas","正常系","dependent: :destroy_asyncで関連レコードが非同期削除されること","関連するAppliedSlaが存在","SlaPolicyを削除","関連するAppliedSlaの削除ジョブがenqueueされる","中","非同期削除"
"143","UT-ENT-143","SlaPolicy","push_event_data","正常系","イベントデータが正しい形式で返却されること","SlaPolicyが存在","なし","id/name/frt/nrt/rtを含むハッシュ","中","イベント通知用データ"
"144","UT-ENT-144","SlaPolicy","push_event_data","境界値","threshold値がnilの場合もハッシュに含まれること","thresholdが未設定のSlaPolicy","なし","frt/nrt/rtがnilとして含まれるハッシュ","低","null値の処理"
