MCPcopy Create free account
hub / github.com/SwishHQ/spread / TestBundleService_AddActive_Success

Function TestBundleService_AddActive_Success

src/service/bundle_service_test.go:548–565  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

546}
547
548func TestBundleService_AddActive_Success(t *testing.T) {
549 mockAppService := &MockAppService{}
550 mockVersionService := &MockVersionService{}
551 mockEnvironmentService := &MockEnvironmentService{}
552 mockBundleRepo := &MockBundleRepository{}
553 service := NewBundleService(mockAppService, mockVersionService, mockEnvironmentService, mockBundleRepo)
554
555 ctx := context.Background()
556 bundleId := primitive.NewObjectID()
557
558 mockBundleRepo.On("AddActive", ctx, bundleId).Return(nil)
559
560 err := service.AddActive(ctx, bundleId)
561
562 assert.NoError(t, err)
563
564 mockBundleRepo.AssertExpectations(t)
565}
566
567func TestBundleService_AddActive_Error(t *testing.T) {
568 mockAppService := &MockAppService{}

Callers

nothing calls this directly

Calls 2

AddActiveMethod · 0.95
NewBundleServiceFunction · 0.85

Tested by

no test coverage detected