HoudiniEvent object value to 'object_event' (since we also have events)
This commit is contained in:
parent
5ae4f20637
commit
8c9477dab9
3 changed files with 4 additions and 4 deletions
|
@ -68,7 +68,7 @@ private
|
|||
def to_event(event_type, *expand)
|
||||
Jbuilder.new do |event|
|
||||
event.id SecureRandom.uuid
|
||||
event.object 'event'
|
||||
event.object 'object_event'
|
||||
event.type event_type
|
||||
event.data do
|
||||
event.object to_builder(*expand)
|
||||
|
|
|
@ -41,7 +41,7 @@ export interface HoudiniEvent<EventType extends string, DataObject extends Houdi
|
|||
* A UUID uniquely representing the event
|
||||
*/
|
||||
id: string;
|
||||
object: 'event';
|
||||
object: 'object_event';
|
||||
/** The type of event that this is */
|
||||
type: EventType;
|
||||
|
||||
|
|
|
@ -16,7 +16,7 @@ RSpec.describe TagMaster, type: :model do
|
|||
it 'announces create' do
|
||||
expect(Houdini.event_publisher).to receive(:announce).with(:tag_master_created, {
|
||||
'id' => kind_of(String),
|
||||
'object' => 'event',
|
||||
'object' => 'object_event',
|
||||
'type' => 'tag_master.created',
|
||||
'data' => {
|
||||
'object' => {
|
||||
|
@ -36,7 +36,7 @@ RSpec.describe TagMaster, type: :model do
|
|||
expect(Houdini.event_publisher).to receive(:announce).with(:tag_master_created, anything).ordered
|
||||
expect(Houdini.event_publisher).to receive(:announce).with(:tag_master_deleted, {
|
||||
'id' => kind_of(String),
|
||||
'object' => 'event',
|
||||
'object' => 'object_event',
|
||||
'type' => 'tag_master.deleted',
|
||||
'data' => {
|
||||
'object' => {
|
||||
|
|
Loading…
Reference in a new issue