mirror of
https://github.com/go-gitea/gitea
synced 2025-07-15 15:07:20 +00:00
Refactor AssertExistsAndLoadBean to use generics (#20797)
* Refactor AssertExistsAndLoadBean to use generics * Fix tests Co-authored-by: zeripath <art27@cantab.net>
This commit is contained in:
@ -70,7 +70,7 @@ func TestCreateOrStopIssueStopwatch(t *testing.T) {
|
||||
assert.NoError(t, err)
|
||||
|
||||
assert.NoError(t, issues_model.CreateOrStopIssueStopwatch(user3, issue1))
|
||||
sw := unittest.AssertExistsAndLoadBean(t, &issues_model.Stopwatch{UserID: 3, IssueID: 1}).(*issues_model.Stopwatch)
|
||||
sw := unittest.AssertExistsAndLoadBean(t, &issues_model.Stopwatch{UserID: 3, IssueID: 1})
|
||||
assert.LessOrEqual(t, sw.CreatedUnix, timeutil.TimeStampNow())
|
||||
|
||||
assert.NoError(t, issues_model.CreateOrStopIssueStopwatch(user2, issue2))
|
||||
|
Reference in New Issue
Block a user