diff options
Diffstat (limited to 'spec/support/shared_examples/models/concerns/repository_storage_movable_shared_examples.rb')
-rw-r--r-- | spec/support/shared_examples/models/concerns/repository_storage_movable_shared_examples.rb | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/spec/support/shared_examples/models/concerns/repository_storage_movable_shared_examples.rb b/spec/support/shared_examples/models/concerns/repository_storage_movable_shared_examples.rb index 4c617f3ba46..7a09a437ab3 100644 --- a/spec/support/shared_examples/models/concerns/repository_storage_movable_shared_examples.rb +++ b/spec/support/shared_examples/models/concerns/repository_storage_movable_shared_examples.rb @@ -33,7 +33,7 @@ RSpec.shared_examples 'handles repository moves' do subject { build(repository_storage_factory_key, container: container) } it "does not allow the container to be read-only on create" do - container.update!(repository_read_only: true) + container.set_repository_read_only! expect(subject).not_to be_valid expect(subject.errors[error_key].first).to match(/is read only/) @@ -45,8 +45,8 @@ RSpec.shared_examples 'handles repository moves' do context 'destination_storage_name' do subject { build(repository_storage_factory_key) } - it 'picks storage from ApplicationSetting' do - expect(Gitlab::CurrentSettings).to receive(:pick_repository_storage).and_return('picked').at_least(:once) + it 'can pick new storage' do + expect(Repository).to receive(:pick_storage_shard).and_return('picked').at_least(:once) expect(subject.destination_storage_name).to eq('picked') end |