File tree Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -12,6 +12,7 @@ import (
12
12
"time"
13
13
14
14
"github.com/stretchr/testify/assert"
15
+ "github.com/stretchr/testify/mock"
15
16
)
16
17
17
18
const TEST_DATA_DIR = "test-data/assignment-v2"
@@ -22,8 +23,9 @@ var tstData = []testData{}
22
23
func Test_e2e (t * testing.T ) {
23
24
serverUrl := initFixture ()
24
25
25
- asmntLogger := & AssignmentLogger {}
26
- client := InitClient (Config {BaseUrl : serverUrl , ApiKey : "dummy" , AssignmentLogger : asmntLogger })
26
+ mockLogger := new (mockLogger )
27
+ mockLogger .Mock .On ("LogAssignment" , mock .Anything ).Return ()
28
+ client := InitClient (Config {BaseUrl : serverUrl , ApiKey : "dummy" , AssignmentLogger : mockLogger })
27
29
28
30
time .Sleep (2 * time .Second )
29
31
@@ -128,6 +130,8 @@ func Test_e2e(t *testing.T) {
128
130
}
129
131
assert .Equal (t , expectedAssignments , stringAssignments )
130
132
}
133
+
134
+ mockLogger .AssertCalled (t , "LogAssignment" , mock .Anything )
131
135
}
132
136
}
133
137
You can’t perform that action at this time.
0 commit comments