@@ -20,6 +20,8 @@ func TestServer_HandlesExpectation(t *testing.T) {
2020 res , err := http .Get (s .URL () + "/test/path" )
2121 require .NoError (t , err )
2222 assert .Equal (t , 200 , res .StatusCode )
23+
24+ s .AssertExpectations ()
2325}
2426
2527func TestServer_HandlesExpectationWithQuery (t * testing.T ) {
@@ -31,6 +33,7 @@ func TestServer_HandlesExpectationWithQuery(t *testing.T) {
3133 res , err := http .Get (s .URL () + "/test/path?p=some%2Fpath" )
3234 require .NoError (t , err )
3335 assert .Equal (t , 200 , res .StatusCode )
36+ s .AssertExpectations ()
3437}
3538
3639func TestServer_HandlesAnythingMethodExpectation (t * testing.T ) {
@@ -42,6 +45,7 @@ func TestServer_HandlesAnythingMethodExpectation(t *testing.T) {
4245 res , err := http .Post (s .URL ()+ "/test/path" , "text/plain" , bytes .NewReader ([]byte {}))
4346 require .NoError (t , err )
4447 assert .Equal (t , 200 , res .StatusCode )
48+ s .AssertExpectations ()
4549}
4650
4751func TestServer_HandlesAnythingPathExpectation (t * testing.T ) {
@@ -53,6 +57,7 @@ func TestServer_HandlesAnythingPathExpectation(t *testing.T) {
5357 res , err := http .Get (s .URL () + "/test/path" )
5458 require .NoError (t , err )
5559 assert .Equal (t , 200 , res .StatusCode )
60+ s .AssertExpectations ()
5661}
5762
5863func TestServer_HandlesWildcardPathExpectation (t * testing.T ) {
@@ -64,6 +69,7 @@ func TestServer_HandlesWildcardPathExpectation(t *testing.T) {
6469 res , err := http .Get (s .URL () + "/test/path" )
6570 require .NoError (t , err )
6671 assert .Equal (t , 200 , res .StatusCode )
72+ s .AssertExpectations ()
6773}
6874
6975func TestServer_HandlesUnexpectedMethodRequest (t * testing.T ) {
@@ -130,6 +136,8 @@ func TestServer_HandlesExpectationNTimes(t *testing.T) {
130136 _ , _ = http .Get (s .URL () + "/test/path" )
131137 _ , _ = http .Get (s .URL () + "/test/path" )
132138 _ , _ = http .Get (s .URL () + "/test/path" )
139+
140+ s .AssertExpectations ()
133141}
134142
135143func TestServer_HandlesExpectationUnlimitedTimes (t * testing.T ) {
@@ -146,6 +154,8 @@ func TestServer_HandlesExpectationUnlimitedTimes(t *testing.T) {
146154
147155 _ , _ = http .Get (s .URL () + "/test/path" )
148156 _ , _ = http .Get (s .URL () + "/test/path" )
157+
158+ s .AssertExpectations ()
149159}
150160
151161func TestServer_ExpectationReturnsBodyBytes (t * testing.T ) {
0 commit comments