diff --git a/app/controller/submission_test.go b/app/controller/submission_test.go index 0c998221..78c93cc5 100644 --- a/app/controller/submission_test.go +++ b/app/controller/submission_test.go @@ -23,7 +23,7 @@ const ( submitter ) -func createSubmissionForTest(t *testing.T, name string, id int, problem *models.Problem, user *models.User, code *fileContent, testCaseCount int) (submission models.Submission) { +func createSubmissionForTest(t *testing.T, name string, id int, problem *models.Problem, user *models.User, code *fileContent, testCaseCount int) models.Submission { for i := 0; i < testCaseCount; i++ { createTestCaseForTest(t, *problem, testCaseData{ Score: 0, @@ -33,7 +33,7 @@ func createSubmissionForTest(t *testing.T, name string, id int, problem *models. }) } problem.LoadTestCases() - submission = models.Submission{ + submission := models.Submission{ UserID: user.ID, User: user, ProblemID: problem.ID, @@ -72,7 +72,7 @@ func createSubmissionForTest(t *testing.T, name string, id int, problem *models. _, err = code.reader.Seek(0, io.SeekStart) assert.NoError(t, err) } - return + return submission } func TestCreateSubmission(t *testing.T) {