diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2021-08-19 12:08:42 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2021-08-19 12:08:42 +0300 |
commit | b76ae638462ab0f673e5915986070518dd3f9ad3 (patch) | |
tree | bdab0533383b52873be0ec0eb4d3c66598ff8b91 /spec/lib/gitlab/database/migrations/observers/total_database_size_change_spec.rb | |
parent | 434373eabe7b4be9593d18a585fb763f1e5f1a6f (diff) |
Add latest changes from gitlab-org/gitlab@14-2-stable-eev14.2.0-rc42
Diffstat (limited to 'spec/lib/gitlab/database/migrations/observers/total_database_size_change_spec.rb')
-rw-r--r-- | spec/lib/gitlab/database/migrations/observers/total_database_size_change_spec.rb | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/spec/lib/gitlab/database/migrations/observers/total_database_size_change_spec.rb b/spec/lib/gitlab/database/migrations/observers/total_database_size_change_spec.rb index 73466471944..61e28003e66 100644 --- a/spec/lib/gitlab/database/migrations/observers/total_database_size_change_spec.rb +++ b/spec/lib/gitlab/database/migrations/observers/total_database_size_change_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' RSpec.describe Gitlab::Database::Migrations::Observers::TotalDatabaseSizeChange do - subject { described_class.new } + subject { described_class.new(observation) } let(:observation) { Gitlab::Database::Migrations::Observation.new } let(:connection) { ActiveRecord::Base.connection } @@ -14,7 +14,7 @@ RSpec.describe Gitlab::Database::Migrations::Observers::TotalDatabaseSizeChange subject.before subject.after - subject.record(observation) + subject.record expect(observation.total_database_size_change).to eq(256 - 1024) end @@ -27,13 +27,13 @@ RSpec.describe Gitlab::Database::Migrations::Observers::TotalDatabaseSizeChange it 'does not record anything if before size is unknown' do subject.after - expect { subject.record(observation) }.not_to change { observation.total_database_size_change } + expect { subject.record }.not_to change { observation.total_database_size_change } end it 'does not record anything if after size is unknown' do subject.before - expect { subject.record(observation) }.not_to change { observation.total_database_size_change } + expect { subject.record }.not_to change { observation.total_database_size_change } end end end |