diff --git a/lib/table_sync/publishing/raw.rb b/lib/table_sync/publishing/raw.rb index 7191820..16f1a9c 100644 --- a/lib/table_sync/publishing/raw.rb +++ b/lib/table_sync/publishing/raw.rb @@ -14,7 +14,7 @@ class TableSync::Publishing::Raw attribute :event, default: :update - require_attributes :model_name, :original_attributes + require_attributes :model_name, :original_attributes, :table_name, :schema_name def publish_now message.publish diff --git a/spec/publishing/raw_spec.rb b/spec/publishing/raw_spec.rb index d1ac9c1..4f3b5c1 100644 --- a/spec/publishing/raw_spec.rb +++ b/spec/publishing/raw_spec.rb @@ -8,6 +8,8 @@ let(:expected_routing_key) { "custom_routing_key" } let(:headers) { { some_key: "123" } } let(:original_attributes) { [{ id: 1, name: "purum" }] } + let(:table_name) { "sequel_users" } + let(:schema_name) { "public" } let(:attributes) do { @@ -16,8 +18,8 @@ routing_key:, headers:, event:, - table_name: nil, - schema_name: nil, + table_name:, + schema_name:, custom_version: nil, } end @@ -40,5 +42,5 @@ include_examples "publisher#new without expected fields", TableSync::Publishing::Raw, - %i[model_name original_attributes] + %i[model_name original_attributes table_name schema_name] end