diff options
Diffstat (limited to 'spec/models/concerns/has_user_type_spec.rb')
-rw-r--r-- | spec/models/concerns/has_user_type_spec.rb | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/spec/models/concerns/has_user_type_spec.rb b/spec/models/concerns/has_user_type_spec.rb index 03d2c267098..e7f041296b7 100644 --- a/spec/models/concerns/has_user_type_spec.rb +++ b/spec/models/concerns/has_user_type_spec.rb @@ -5,8 +5,9 @@ require 'spec_helper' RSpec.describe User, feature_category: :system_access do specify 'types consistency checks', :aggregate_failures do expect(described_class::USER_TYPES.keys) - .to match_array(%w[human ghost alert_bot project_bot support_bot service_user security_bot visual_review_bot - migration_bot automation_bot security_policy_bot admin_bot suggested_reviewers_bot service_account]) + .to match_array(%w[human human_deprecated ghost alert_bot project_bot support_bot service_user security_bot + visual_review_bot migration_bot automation_bot security_policy_bot admin_bot suggested_reviewers_bot + service_account llm_bot]) expect(described_class::USER_TYPES).to include(*described_class::BOT_USER_TYPES) expect(described_class::USER_TYPES).to include(*described_class::NON_INTERNAL_USER_TYPES) expect(described_class::USER_TYPES).to include(*described_class::INTERNAL_USER_TYPES) @@ -22,7 +23,13 @@ RSpec.describe User, feature_category: :system_access do describe '.humans' do it 'includes humans only' do - expect(described_class.humans).to match_array([human]) + expect(described_class.humans).to match_array([human, human_deprecated]) + end + end + + describe '.human' do + it 'includes humans only' do + expect(described_class.human).to match_array([human, human_deprecated]) end end @@ -69,6 +76,7 @@ RSpec.describe User, feature_category: :system_access do describe '#human?' do it 'is true for humans only' do expect(human).to be_human + expect(human_deprecated).to be_human expect(alert_bot).not_to be_human expect(User.new).to be_human end |