summaryrefslogtreecommitdiff
path: root/spec/helpers/application_settings_helper_spec.rb
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2022-04-20 10:00:54 +0000
committerGitLab Bot <gitlab-bot@gitlab.com>2022-04-20 10:00:54 +0000
commit3cccd102ba543e02725d247893729e5c73b38295 (patch)
treef36a04ec38517f5deaaacb5acc7d949688d1e187 /spec/helpers/application_settings_helper_spec.rb
parent205943281328046ef7b4528031b90fbda70c75ac (diff)
downloadgitlab-ce-3cccd102ba543e02725d247893729e5c73b38295.tar.gz
Add latest changes from gitlab-org/gitlab@14-10-stable-eev14.10.0-rc42
Diffstat (limited to 'spec/helpers/application_settings_helper_spec.rb')
-rw-r--r--spec/helpers/application_settings_helper_spec.rb15
1 files changed, 8 insertions, 7 deletions
diff --git a/spec/helpers/application_settings_helper_spec.rb b/spec/helpers/application_settings_helper_spec.rb
index 26d48bef24e..c93762416f5 100644
--- a/spec/helpers/application_settings_helper_spec.rb
+++ b/spec/helpers/application_settings_helper_spec.rb
@@ -149,7 +149,7 @@ RSpec.describe ApplicationSettingsHelper do
end
end
- describe '.storage_weights' do
+ describe '#storage_weights' do
let(:application_setting) { build(:application_setting) }
before do
@@ -158,12 +158,13 @@ RSpec.describe ApplicationSettingsHelper do
stub_application_setting(repository_storages_weighted: { 'default' => 100, 'storage_1' => 50, 'storage_2' => nil })
end
- it 'returns storages correctly' do
- expect(helper.storage_weights).to eq(OpenStruct.new(
- default: 100,
- storage_1: 50,
- storage_2: 0
- ))
+ it 'returns storage objects with assigned weights' do
+ expect(helper.storage_weights)
+ .to have_attributes(
+ default: 100,
+ storage_1: 50,
+ storage_2: 0
+ )
end
end