Skip to content
Snippets Groups Projects
Commit d96ddaa8 authored by Fabian Seidl's avatar Fabian Seidl
Browse files

correct test

parent 261b811e
No related branches found
No related tags found
No related merge requests found
Pipeline #125268 failed
...@@ -124,6 +124,7 @@ func TestNewUpdateEvent(t *testing.T) { ...@@ -124,6 +124,7 @@ func TestNewUpdateEvent(t *testing.T) {
func TestNewMneUpdateEvent(t *testing.T) { func TestNewMneUpdateEvent(t *testing.T) {
type args struct { type args struct {
entityID uuid.UUID entityID uuid.UUID
paths []string
} }
tests := []struct { tests := []struct {
name string name string
...@@ -134,6 +135,7 @@ func TestNewMneUpdateEvent(t *testing.T) { ...@@ -134,6 +135,7 @@ func TestNewMneUpdateEvent(t *testing.T) {
name: "should create a new update event", name: "should create a new update event",
args: args{ args: args{
entityID: getTestEntityUUID(), entityID: getTestEntityUUID(),
paths: []string{"some/random/path"},
}, },
want: Event{ want: Event{
ID: uuid.New(), ID: uuid.New(),
...@@ -145,7 +147,7 @@ func TestNewMneUpdateEvent(t *testing.T) { ...@@ -145,7 +147,7 @@ func TestNewMneUpdateEvent(t *testing.T) {
} }
for _, tt := range tests { for _, tt := range tests {
t.Run(tt.name, func(t *testing.T) { t.Run(tt.name, func(t *testing.T) {
got := NewMneUpdateEvent(tt.args.entityID, []string{"some/random/path"}) got := NewMneUpdateEvent(tt.args.entityID, tt.args.paths)
if !reflect.DeepEqual(got.EntityID, tt.want.EntityID) { if !reflect.DeepEqual(got.EntityID, tt.want.EntityID) {
t.Errorf("NewMneUpdateEvent().EntityID = %v, want %v", got, tt.want) t.Errorf("NewMneUpdateEvent().EntityID = %v, want %v", got, tt.want)
...@@ -154,6 +156,10 @@ func TestNewMneUpdateEvent(t *testing.T) { ...@@ -154,6 +156,10 @@ func TestNewMneUpdateEvent(t *testing.T) {
if !reflect.DeepEqual(got.Type, tt.want.Type) { if !reflect.DeepEqual(got.Type, tt.want.Type) {
t.Errorf("NewMneUpdateEvent().Type = %v, want %v", got, tt.want) t.Errorf("NewMneUpdateEvent().Type = %v, want %v", got, tt.want)
} }
if !reflect.DeepEqual(got.Paths, tt.want.Paths) {
t.Errorf("NewMneUpdateEvent().Type = %v, want %v", got, tt.want)
}
}) })
} }
} }
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment