diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2021-02-05 16:20:45 +0000 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2021-02-05 16:20:45 +0000 |
commit | d298fad0c0564454271cba11e6f20c19681534ac (patch) | |
tree | 0a19d07d8b3bdd2574617305c300e404f2ace581 /spec/lib/api/entities/user_spec.rb | |
parent | c9f9eec79cab801a50db698f682aacffbedf07f7 (diff) | |
download | gitlab-ce-13.9.0-rc41.tar.gz |
Add latest changes from gitlab-org/gitlab@13-9-stable-eev13.9.0-rc41
Diffstat (limited to 'spec/lib/api/entities/user_spec.rb')
-rw-r--r-- | spec/lib/api/entities/user_spec.rb | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/spec/lib/api/entities/user_spec.rb b/spec/lib/api/entities/user_spec.rb index 99ffe0eb925..e35deeb6263 100644 --- a/spec/lib/api/entities/user_spec.rb +++ b/spec/lib/api/entities/user_spec.rb @@ -23,4 +23,16 @@ RSpec.describe API::Entities::User do expect(subject).not_to include(:created_at) end + + it 'exposes user as not a bot' do + expect(subject[:bot]).to be_falsey + end + + context 'with bot user' do + let(:user) { create(:user, :security_bot) } + + it 'exposes user as a bot' do + expect(subject[:bot]).to eq(true) + end + end end |