github.com/hyperledger/aries-framework-go@v0.3.2/pkg/didcomm/common/service/event_test.go (about) 1 /* 2 Copyright SecureKey Technologies Inc. All Rights Reserved. 3 4 SPDX-License-Identifier: Apache-2.0 5 */ 6 7 package service 8 9 import ( 10 "testing" 11 ) 12 13 func TestAutoExecuteActionEvent(t *testing.T) { 14 ch := make(chan DIDCommAction) 15 done := make(chan struct{}) 16 17 go func() { 18 AutoExecuteActionEvent(ch) 19 close(done) 20 }() 21 22 ch <- DIDCommAction{Continue: func(args interface{}) { 23 }} 24 25 close(ch) 26 <-done 27 }