@@ -13,7 +13,7 @@ func TestNewMock(t *testing.T) {
13
13
req := NewRequest ()
14
14
res := NewResponse ()
15
15
mock := NewMock (req , res )
16
- st .Expect (t , mock .disabled , false )
16
+ st .Expect (t , mock .disabler . isDisabled () , false )
17
17
st .Expect (t , len (mock .matcher .Get ()), len (DefaultMatcher .Get ()))
18
18
19
19
st .Expect (t , mock .Request (), req )
@@ -29,9 +29,9 @@ func TestMockDisable(t *testing.T) {
29
29
res := NewResponse ()
30
30
mock := NewMock (req , res )
31
31
32
- st .Expect (t , mock .disabled , false )
32
+ st .Expect (t , mock .disabler . isDisabled () , false )
33
33
mock .Disable ()
34
- st .Expect (t , mock .disabled , true )
34
+ st .Expect (t , mock .disabler . isDisabled () , true )
35
35
36
36
matches , err := mock .Match (& http.Request {})
37
37
st .Expect (t , err , nil )
@@ -45,21 +45,21 @@ func TestMockDone(t *testing.T) {
45
45
res := NewResponse ()
46
46
47
47
mock := NewMock (req , res )
48
- st .Expect (t , mock .disabled , false )
48
+ st .Expect (t , mock .disabler . isDisabled () , false )
49
49
st .Expect (t , mock .Done (), false )
50
50
51
51
mock = NewMock (req , res )
52
- st .Expect (t , mock .disabled , false )
52
+ st .Expect (t , mock .disabler . isDisabled () , false )
53
53
mock .Disable ()
54
54
st .Expect (t , mock .Done (), true )
55
55
56
56
mock = NewMock (req , res )
57
- st .Expect (t , mock .disabled , false )
57
+ st .Expect (t , mock .disabler . isDisabled () , false )
58
58
mock .request .Counter = 0
59
59
st .Expect (t , mock .Done (), true )
60
60
61
61
mock = NewMock (req , res )
62
- st .Expect (t , mock .disabled , false )
62
+ st .Expect (t , mock .disabler . isDisabled () , false )
63
63
mock .request .Persisted = true
64
64
st .Expect (t , mock .Done (), false )
65
65
}
@@ -79,7 +79,7 @@ func TestMockSetMatcher(t *testing.T) {
79
79
})
80
80
mock .SetMatcher (matcher )
81
81
st .Expect (t , len (mock .matcher .Get ()), 1 )
82
- st .Expect (t , mock .disabled , false )
82
+ st .Expect (t , mock .disabler . isDisabled () , false )
83
83
84
84
matches , err := mock .Match (& http.Request {})
85
85
st .Expect (t , err , nil )
@@ -100,7 +100,7 @@ func TestMockAddMatcher(t *testing.T) {
100
100
mock .AddMatcher (func (req * http.Request , ereq * Request ) (bool , error ) {
101
101
return true , nil
102
102
})
103
- st .Expect (t , mock .disabled , false )
103
+ st .Expect (t , mock .disabler . isDisabled () , false )
104
104
st .Expect (t , mock .matcher , matcher )
105
105
106
106
matches , err := mock .Match (& http.Request {})
@@ -127,7 +127,7 @@ func TestMockMatch(t *testing.T) {
127
127
calls ++
128
128
return true , nil
129
129
})
130
- st .Expect (t , mock .disabled , false )
130
+ st .Expect (t , mock .disabler . isDisabled () , false )
131
131
st .Expect (t , mock .matcher , matcher )
132
132
133
133
matches , err := mock .Match (& http.Request {})
0 commit comments