diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2023-02-24 12:09:47 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2023-02-24 12:09:47 +0300 |
commit | b0d6a7fbff3f97a4b2b56b672902a21e0fc29195 (patch) | |
tree | 01ea5944b79765c1dd7dae3823e2072a8bc5482b /spec/models | |
parent | e3dc4fc8f5df44ccd33739908bd4df2494cc27cc (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/models')
-rw-r--r-- | spec/models/achievements/user_achievement_spec.rb | 2 | ||||
-rw-r--r-- | spec/models/application_setting_spec.rb | 3 |
2 files changed, 3 insertions, 2 deletions
diff --git a/spec/models/achievements/user_achievement_spec.rb b/spec/models/achievements/user_achievement_spec.rb index 9d88bfdd477..291f843b824 100644 --- a/spec/models/achievements/user_achievement_spec.rb +++ b/spec/models/achievements/user_achievement_spec.rb @@ -7,7 +7,7 @@ RSpec.describe Achievements::UserAchievement, type: :model, feature_category: :u it { is_expected.to belong_to(:achievement).inverse_of(:user_achievements).required } it { is_expected.to belong_to(:user).inverse_of(:user_achievements).required } - it { is_expected.to belong_to(:awarded_by_user).class_name('User').inverse_of(:awarded_user_achievements).optional } + it { is_expected.to belong_to(:awarded_by_user).class_name('User').inverse_of(:awarded_user_achievements).required } it { is_expected.to belong_to(:revoked_by_user).class_name('User').inverse_of(:revoked_user_achievements).optional } end end diff --git a/spec/models/application_setting_spec.rb b/spec/models/application_setting_spec.rb index 762b613a585..8de9932a519 100644 --- a/spec/models/application_setting_spec.rb +++ b/spec/models/application_setting_spec.rb @@ -182,7 +182,8 @@ RSpec.describe ApplicationSetting, feature_category: :not_owned, type: :model do it { is_expected.not_to allow_value('default' => 101).for(:repository_storages_weighted).with_message("value for 'default' must be between 0 and 100") } it { is_expected.not_to allow_value('default' => 100, shouldntexist: 50).for(:repository_storages_weighted).with_message("can't include: shouldntexist") } - %i[notes_create_limit search_rate_limit search_rate_limit_unauthenticated users_get_by_id_limit].each do |setting| + %i[notes_create_limit search_rate_limit search_rate_limit_unauthenticated users_get_by_id_limit + projects_api_rate_limit_unauthenticated].each do |setting| it { is_expected.to allow_value(400).for(setting) } it { is_expected.not_to allow_value('two').for(setting) } it { is_expected.not_to allow_value(nil).for(setting) } |