Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2021-05-19 18:44:42 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2021-05-19 18:44:42 +0300
commit4555e1b21c365ed8303ffb7a3325d773c9b8bf31 (patch)
tree5423a1c7516cffe36384133ade12572cf709398d /spec/helpers/users_helper_spec.rb
parente570267f2f6b326480d284e0164a6464ba4081bc (diff)
Add latest changes from gitlab-org/gitlab@13-12-stable-eev13.12.0-rc42
Diffstat (limited to 'spec/helpers/users_helper_spec.rb')
-rw-r--r--spec/helpers/users_helper_spec.rb12
1 files changed, 11 insertions, 1 deletions
diff --git a/spec/helpers/users_helper_spec.rb b/spec/helpers/users_helper_spec.rb
index f0f09408249..862fd58df04 100644
--- a/spec/helpers/users_helper_spec.rb
+++ b/spec/helpers/users_helper_spec.rb
@@ -136,6 +136,16 @@ RSpec.describe UsersHelper do
end
end
+ context 'with a banned user' do
+ it 'returns the banned badge' do
+ banned_user = create(:user, :banned)
+
+ badges = helper.user_badges_in_admin_section(banned_user)
+
+ expect(filter_ee_badges(badges)).to eq([text: 'Banned', variant: 'danger'])
+ end
+ end
+
context 'with an admin user' do
it "returns the admin badge" do
admin_user = create(:admin)
@@ -160,7 +170,7 @@ RSpec.describe UsersHelper do
it 'returns the "It\'s You" badge' do
badges = helper.user_badges_in_admin_section(user)
- expect(filter_ee_badges(badges)).to eq([text: "It's you!", variant: nil])
+ expect(filter_ee_badges(badges)).to eq([text: "It's you!", variant: "muted"])
end
end