summaryrefslogtreecommitdiff
path: root/spec/lib/gitlab/current_settings_spec.rb
diff options
context:
space:
mode:
Diffstat (limited to 'spec/lib/gitlab/current_settings_spec.rb')
-rw-r--r--spec/lib/gitlab/current_settings_spec.rb7
1 files changed, 7 insertions, 0 deletions
diff --git a/spec/lib/gitlab/current_settings_spec.rb b/spec/lib/gitlab/current_settings_spec.rb
index fda39d78610..85bff1cf46c 100644
--- a/spec/lib/gitlab/current_settings_spec.rb
+++ b/spec/lib/gitlab/current_settings_spec.rb
@@ -32,6 +32,13 @@ describe Gitlab::CurrentSettings do
expect(current_application_settings).to be_a(ApplicationSetting)
end
+
+ it 'returns an in-memory ApplicationSetting object if migrations are present in a Rake task' do
+ allow_any_instance_of(described_class).to receive(:rake_task?).and_return(true)
+ expect(ActiveRecord::Migrator).to receive(:needs_migration?).and_return(true)
+
+ expect(current_application_settings).to be_a(OpenStruct)
+ end
end
context 'with DB unavailable' do