Skip to content

Commit

Permalink
fix: Configure missing expectation for controller test
Browse files Browse the repository at this point in the history
Synchronizing an event now requires calling `GetCalendarID()` on the sink.
This requirement was introduced by the commit
`feat: do not resurrect event when syncing in both directions` which
conflicts with `feat: Implement option to enable / disable sync of
declined events`.
  • Loading branch information
MichaelEischer committed Oct 8, 2023
1 parent 716ff6f commit a00e01b
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions internal/sync/controller_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -525,6 +525,7 @@ func (suite *ControllerTestSuite) TestCreateEventsDeclined() {
suite.source.On("EventsInTimeframe", ctx, startTime, endTime).Return(eventsToCreate, nil)
suite.sink.On("EventsInTimeframe", ctx, startTime, endTime).Return(nil, nil)
suite.sink.On("CreateEvent", ctx, mock.AnythingOfType("models.Event")).Return(nil)
suite.sink.On("GetCalendarID").Return("sinkID")

err := suite.controller.SynchroniseTimeframe(ctx, startTime, endTime, false)
assert.NoError(suite.T(), err)
Expand Down

0 comments on commit a00e01b

Please sign in to comment.