794 Commits

Author SHA1 Message Date
gohargasparyan
484fff1ace didn't notice should run go generate 2020-05-04 07:47:34 +10:00
gohargasparyan
9d083cac4a go format 2020-05-04 07:47:34 +10:00
gohargasparyan
2adb7b54b7 correct missing parameters in require and require_forward 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
David Wragg
ca8e08c131 Support uint in InDelta and InEpsilon
InDelta and InEpsilon assertions on uint values would fail with
the error "Parameters must be numerical".
2020-04-29 21:29:26 +10:00
Yaroslav Kolomiiets
3bf8d0aa5e callString not to panic on nil
Fixes stretchr/testify#936.
2020-04-29 21:10:54 +10:00
Dave Henderson
d3decad621 Update dependency to gopkg.in/yaml.v3
Signed-off-by: Dave Henderson <dhenderson@gmail.com>
2020-04-28 07:45:39 +10:00
sarathsp06
35d4bf5bd4 panic: add .Panic() to mock.Call
Panic mocks a function call that panics with th specfied message
2020-04-27 19:52:16 +10:00
Boyan
2566b66989 Resolve conflicts 2020-04-24 07:38:44 +10:00
Aaron N. Brock
f238e4b70a Move teardown defers to before setup 2020-04-24 07:38:44 +10:00
ariley
f43aa3c488 Change to guard clause 2020-04-23 15:52:53 +02:00
ariley
a41f2db807 Add warning in log when no tests are run within a suite 2020-04-23 15:52:53 +02:00
Boyan
36f3f1ec85 Add motivation and example usage 2020-04-08 19:05:01 +10:00
Boyan
1752a4b8e5 Add GitHub pull request template 2020-04-08 19:05:01 +10:00
Martijn
b1dfcec1fe Add mvdkleijn as extra maintainer 2020-04-07 09:01:36 -06:00
Angel_Kitty
46796a5c6a Update License file copyright year 2020-04-07 15:16:17 +02:00
Angel_Kitty
581db3dfa7 Update License file copyright year 2020-04-07 15:16:17 +02:00
Angel_Kitty
2c1f261278 Update License file copyright year 2020-04-07 15:16:17 +02:00
Martijn
bb468cc94d Remove unneeded return statements 2020-04-06 07:42:56 +10:00
Martijn
28b7455875 Ran go generate ./... 2020-04-06 07:42:56 +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
Martijn
f0828adbb3 Add HTTPStatusCode assertion
Allows for asserting a specific HTTP status code was returned instead of a general success, error or redirect assertion.
2020-04-06 07:42:56 +10:00
hectorj
012967472b Make InEpsilon fail when given a NaN
fixes #918
2020-04-02 22:34:25 +11:00
YukinoKamei
dfba5a4e3a add ) 2020-03-30 15:55:14 +11:00
Martin Sucha
f6cbfc0d03 Print more details in ElementsMatch
It is not very helpful to print that the lengths differ when an
assertion fails, since that does not reveal what the cause of the issue
might be.

Let's print which elements are extra in each list, that should convey
the relevant information to the user. Also use spew to format the
objects, similar to what Equal does, to make the output more readable.
2020-03-14 21:17:20 +11:00
Esdras Beleza de Noronha
961bfee4b1 Add function to return if all tests in a suite passed 2020-03-11 19:42:32 +11:00
Esdras Beleza de Noronha
f37e428318 Use comma ok idiom 2020-03-11 19:42:32 +11:00
Esdras Beleza de Noronha
89909913cc Fix var block with only one variable 2020-03-11 19:42:32 +11:00
Esdras Beleza de Noronha
9feda7c901 Change imports for consistency 2020-03-11 19:42:32 +11:00
Esdras Beleza de Noronha
fdf3f01101 Update documentation 2020-03-11 19:42:32 +11:00
Esdras Beleza
e8910bb335 Add stats to suites and tests 2020-03-11 19:42:32 +11:00
Henry Blyth
cb23521296 Test verbose Contains Fail message
If asserting an error contained in a string, includeElement will fail
but Contains will confusingly print both values as strings, which can
look like a testify problem instead of an assertion failure.
2020-03-10 08:59:40 +11:00
Jordan Christiansen
c12dcedf28 Include the type in assert.Contains error messages
Fixes #828
2020-03-10 08:59:40 +11:00
alexpantyukhin
6be346c1f1 rename order files to compare files 2020-03-09 08:00:09 +11:00
Alexander Pantyukhin
9388656beb fix language 2020-03-06 19:44:08 +11:00
Alexander Pantyukhin
2ca25e3fac fix for assertions 2020-03-06 19:44:08 +11:00
Alexander Pantyukhin
ec73f449b3 add new tests 2020-03-06 19:44:08 +11:00
Alexander Pantyukhin
0b4ff03cda update assertion_order.go according review notes 2020-03-06 19:44:08 +11:00
Alexander Pantyukhin
ad53dbbf0a put constants instead of values. 2020-03-06 19:44:08 +11:00
alexpantyukhin
d583a38000 fix with gofmt tool 2020-03-06 19:44:08 +11:00
alexpantyukhin
f4b48264a4 fix fmt 2020-03-06 19:44:08 +11:00
alexpantyukhin
c106be4ce3 refactoring of assertion_order 2020-03-06 19:44:08 +11:00
Christian Muehlhaeuser
02b2656991 Handle ineffectual assignments
Removed ineffectual assignments.
2020-03-06 16:18:13 +11:00
Christian Muehlhaeuser
1c7f4ef084 Avoid unnecessary conversions
No need to convert values here.
2020-03-06 14:40:56 +11:00
Christian Muehlhaeuser
3acde138ca Format code with goimports
Fixed formatting and import order.
2020-03-06 14:39:08 +11:00
Christian Muehlhaeuser
08b5acc756 Fixed tautological errors
err can't ever be not nil here, unless the Go language specs are changing.
2020-03-06 14:38:03 +11:00
Christian Muehlhaeuser
8bb674980e Simplify code
- Direct boolean comparisons
- Don't use Sprintf when we can use the String() function
2020-03-06 14:36:53 +11:00
Christian Muehlhaeuser
fbbf8a0782 Removed unused variables
Probably just became obsolete by now.
2020-03-06 14:31:21 +11:00
Christian Muehlhaeuser
c5d499e514 Simplify go code
Just reads a bit nicer, in my opinion.
2020-03-06 14:30:34 +11:00