Commit Graph

18 Commits (1419-fail-assertions)

Author SHA1 Message Date
Arjun Mahishi 6e59f20c0d http_assertions: assert that the msgAndArgs actually works in tests
This commit also adds the method `Failed() bool` to the mockTestingT
struct. This is usefull for asserting failure in tests
2024-02-23 22:41:24 +05:30
Arjun Mahishi 840f800f1a http_assertions: Include msgAndArgs is some of the existing tests
A mix of using and not using msgAndArgs will ensure that there is no
regression.
2024-02-23 21:20:50 +05:30
hidu ce5c2b684b assert: fix httpCode and HTTPBody occur panic when http.Handler read body 2023-10-15 23:34:32 +02:00
Menno ab6dc32628 fix linting errors in /assert package 2021-08-24 21:55:23 +10:00
Boyan 3184a9e141 This reverts commit 0a813b5898. 2020-06-05 20:47:15 +10:00
Boyan 6353e56395 This reverts commit 9d083cac4a. 2020-06-05 20:47:15 +10:00
Boyan 46420cf544 This reverts commit 1a43b8334a. 2020-06-05 20:47:15 +10:00
Boyan 303198d014 Revert "allow body for HTTPBodyContains and HTTPBodyNotContains for
POST" PR #938

This reverts commit 136026fb25.
2020-06-05 20:47:15 +10:00
gohargasparyan 136026fb25 add test cases 2020-05-04 07:47:34 +10:00
gohargasparyan 1a43b8334a add test cases 2020-05-04 07:47:34 +10:00
gohargasparyan 9d083cac4a go format 2020-05-04 07:47:34 +10:00
gohargasparyan 0a813b5898 allow body for HTTPBodyContains and HTTPBodyNotContains for POST 2020-05-04 07:47:34 +10:00
Martijn e0afeb10e3 Fix whitespace issues 2020-04-06 07:42:56 +10:00
Martijn 1454493cee Add test for HTTPStatusCode
For purposes of the test, status code 101 is checked as this does not overlap with the other assertions. (HTTPSuccess, HTTPRedirect and HTTPError)
2020-04-06 07:42:56 +10:00
Dinesh Kumar 6efb0c49fb Adding url.Values to request RawQuery, fixes 522 2018-03-18 18:57:06 +00:00
Adam Medziński 78be756ee7 Fixed HTTP assertions messages formatting and removed wrong test message 2017-05-28 13:23:04 +02:00
Adam Medziński 5c9da494dd HTTP code status assertions now fail tests 2017-02-10 14:36:52 +01:00
Victor Kryukov 8b09ac0ee8 Implement HTTP(Success|Error|Redirect) and HTTPBody(Not)Contains 2014-09-14 11:54:12 -06:00