From e144c966cab7ef8d4945c47bf6c03899b6f9c553 Mon Sep 17 00:00:00 2001 From: Dino Omanovic Date: Mon, 11 Jul 2016 15:12:04 +0200 Subject: [PATCH] Change unit tests for cache invalidation handler to include the constructor --- composition/cache_invalidation_handler_test.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/composition/cache_invalidation_handler_test.go b/composition/cache_invalidation_handler_test.go index 24496aa..1859cb4 100644 --- a/composition/cache_invalidation_handler_test.go +++ b/composition/cache_invalidation_handler_test.go @@ -13,7 +13,7 @@ func Test_CacheInvalidationHandler_Invalidation(t *testing.T) { //given cacheMocK := NewMockCache(ctrl) - cih := &CacheInvalidationHandler{cache: cacheMocK} + cih := NewCacheInvalidationHandler(cacheMocK, nil) request, _ := http.NewRequest(http.MethodDelete, "internal/cache", nil) //when @@ -28,7 +28,7 @@ func Test_CacheInvalidationHandler_Delegate_Is_Called(t *testing.T) { //given handlerMock := mockhttp.NewMockHandler(ctrl) cacheMocK := NewMockCache(ctrl) - cih := &CacheInvalidationHandler{cache: cacheMocK, next: handlerMock} + cih := NewCacheInvalidationHandler(cacheMocK, handlerMock) request, _ := http.NewRequest(http.MethodDelete, "internal/cache", nil) //when