-
-
Notifications
You must be signed in to change notification settings - Fork 5.8k
Use single shared random string generation function #15741
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 2 commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -13,12 +13,17 @@ import ( | |
"github.com/stretchr/testify/assert" | ||
) | ||
|
||
func Test_RandomImage(t *testing.T) { | ||
_, err := RandomImage([]byte("gogs@local")) | ||
func Test_RandomImageSize(t *testing.T) { | ||
_, err := RandomImageSize(0, []byte("gitea@local")) | ||
assert.Error(t, err) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. which error ? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. That an image of size 0 is invalid. It returns a chinese error currently coming from https://github.com/issue9/identicon:
|
||
|
||
_, err = RandomImageSize(64, []byte("gitea@local")) | ||
assert.NoError(t, err) | ||
} | ||
|
||
_, err = RandomImageSize(0, []byte("gogs@local")) | ||
assert.Error(t, err) | ||
func Test_RandomImage(t *testing.T) { | ||
_, err := RandomImage([]byte("gitea@local")) | ||
assert.NoError(t, err) | ||
} | ||
|
||
func Test_PrepareWithPNG(t *testing.T) { | ||
|
This file was deleted.
This file was deleted.
Uh oh!
There was an error while loading. Please reload this page.