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:
Diffstat (limited to 'spec/models/user_spec.rb')
-rw-r--r--spec/models/user_spec.rb28
1 files changed, 9 insertions, 19 deletions
diff --git a/spec/models/user_spec.rb b/spec/models/user_spec.rb
index c611c3c26e3..947d83badf6 100644
--- a/spec/models/user_spec.rb
+++ b/spec/models/user_spec.rb
@@ -5073,14 +5073,6 @@ RSpec.describe User, feature_category: :user_profile do
describe '#ci_owned_runners' do
it_behaves_like '#ci_owned_runners'
-
- context 'when FF use_traversal_ids is disabled fallbacks to inefficient implementation' do
- before do
- stub_feature_flags(use_traversal_ids: false)
- end
-
- it_behaves_like '#ci_owned_runners'
- end
end
describe '#projects_with_reporter_access_limited_to' do
@@ -6120,25 +6112,23 @@ RSpec.describe User, feature_category: :user_profile do
end
end
- describe '#allow_possible_spam?' do
+ describe '#trusted?' do
context 'when no custom attribute is set' do
- it 'is false' do
- expect(user.allow_possible_spam?).to be_falsey
+ it 'is falsey' do
+ expect(user.trusted?).to be_falsey
end
end
context 'when the custom attribute is set' do
before do
- user.custom_attributes.upsert_custom_attributes(
- [{
- user_id: user.id,
- key: UserCustomAttribute::ALLOW_POSSIBLE_SPAM,
- value: "test"
- }])
+ user.custom_attributes.create!(
+ key: UserCustomAttribute::TRUSTED_BY,
+ value: "test"
+ )
end
- it '#allow_possible_spam? is true' do
- expect(user.allow_possible_spam?).to be_truthy
+ it 'is truthy' do
+ expect(user.trusted?).to be_truthy
end
end
end