-
Notifications
You must be signed in to change notification settings - Fork 86
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
* add all http request method for testing * chore: update mocks * add Don't See method * chore: update mocks * add AssertSee * chore: update mocks * add test cases for new response methods * . * chore: update mocks * . --------- Co-authored-by: kkumar-gcc <kkumar-gcc@users.noreply.github.com>
- Loading branch information
1 parent
8b33e6b
commit b461b0f
Showing
10 changed files
with
1,285 additions
and
44 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
package testing | ||
|
||
type AssertableJSON interface { | ||
Json() map[string]any | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,22 @@ | ||
package testing | ||
|
||
import ( | ||
"context" | ||
"io" | ||
) | ||
|
||
type TestRequest interface { | ||
WithHeaders(headers map[string]string) TestRequest | ||
WithHeader(key, value string) TestRequest | ||
WithoutHeader(key string) TestRequest | ||
WithCookies(cookies map[string]string) TestRequest | ||
WithCookie(key, value string) TestRequest | ||
WithContext(ctx context.Context) TestRequest | ||
Get(uri string) (TestResponse, error) | ||
Post(uri string, body io.Reader) (TestResponse, error) | ||
Put(uri string, body io.Reader) (TestResponse, error) | ||
Patch(uri string, body io.Reader) (TestResponse, error) | ||
Delete(uri string, body io.Reader) (TestResponse, error) | ||
Head(uri string) (TestResponse, error) | ||
Options(uri string) (TestResponse, error) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Oops, something went wrong.