diff options
author | Jason Goodman <jgoodman@gitlab.com> | 2019-06-26 13:44:35 -0400 |
---|---|---|
committer | Jason Goodman <jgoodman@gitlab.com> | 2019-06-27 13:15:07 -0400 |
commit | f43b1fe5b166d11bbe01526205436c3e699f4406 (patch) | |
tree | 23bcc6dc6e739b77c10fa9aa2dfbd5a533597217 | |
parent | b09a914e4e85b7b35ba1ddbe1b47ad9bb6bf788a (diff) | |
download | gitlab-ce-f43b1fe5b166d11bbe01526205436c3e699f4406.tar.gz |
Add expectation to jsonb migration helper specs
-rw-r--r-- | spec/lib/gitlab/database/migration_helpers_spec.rb | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/spec/lib/gitlab/database/migration_helpers_spec.rb b/spec/lib/gitlab/database/migration_helpers_spec.rb index 8aebf91bb46..ffa38badf5b 100644 --- a/spec/lib/gitlab/database/migration_helpers_spec.rb +++ b/spec/lib/gitlab/database/migration_helpers_spec.rb @@ -588,6 +588,7 @@ describe Gitlab::Database::MigrationHelpers do create(:project) allow(model).to receive(:transaction_open?).and_return(false) allow(model).to receive(:transaction).and_yield + expect(model).to receive(:update_column_in_batches).with(:projects, :foo, '[{"foo":"json"}]').and_call_original expect do model.add_column_with_default(:projects, :foo, :jsonb, default: [{ foo: "json" }]) @@ -598,6 +599,7 @@ describe Gitlab::Database::MigrationHelpers do create(:project) allow(model).to receive(:transaction_open?).and_return(false) allow(model).to receive(:transaction).and_yield + expect(model).to receive(:update_column_in_batches).with(:projects, :foo, '{"foo":"json"}').and_call_original expect do model.add_column_with_default(:projects, :foo, :jsonb, default: { foo: "json" }) |