summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJason Goodman <jgoodman@gitlab.com>2019-06-26 13:44:35 -0400
committerJason Goodman <jgoodman@gitlab.com>2019-06-27 13:15:07 -0400
commitf43b1fe5b166d11bbe01526205436c3e699f4406 (patch)
tree23bcc6dc6e739b77c10fa9aa2dfbd5a533597217
parentb09a914e4e85b7b35ba1ddbe1b47ad9bb6bf788a (diff)
downloadgitlab-ce-f43b1fe5b166d11bbe01526205436c3e699f4406.tar.gz
Add expectation to jsonb migration helper specs
-rw-r--r--spec/lib/gitlab/database/migration_helpers_spec.rb2
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" })