@@ -397,6 +397,8 @@ func RepoSpec(ctx context.Context, urlStr string) func(c convey.C) {
397397
398398 uploadObject (ctx , c , client , "add sec object" , userName , repoName , controller .DefaultBranchName , "b.txt" )
399399 commitWip (ctx , c , client , "commit sec object" , userName , repoName , controller .DefaultBranchName , "second commit" )
400+ uploadObject (ctx , c , client , "add third object" , userName , repoName , controller .DefaultBranchName , "c.txt" )
401+ commitWip (ctx , c , client , "commit third object" , userName , repoName , controller .DefaultBranchName , "third commit" )
400402 c .Convey ("success get commits by params" , func () {
401403 resp , err := client .GetCommitsInRepository (ctx , userName , repoName , & api.GetCommitsInRepositoryParams {
402404 RefName : utils .String (controller .DefaultBranchName ),
@@ -406,8 +408,8 @@ func RepoSpec(ctx context.Context, urlStr string) func(c convey.C) {
406408
407409 result , err := api .ParseGetCommitsInRepositoryResponse (resp )
408410 convey .So (err , convey .ShouldBeNil )
409- convey .So (* result .JSON200 , convey .ShouldHaveLength , 2 )
410- convey .So ((* result .JSON200 )[0 ].Message , convey .ShouldEqual , "second commit" )
411+ convey .So (* result .JSON200 , convey .ShouldHaveLength , 3 )
412+ convey .So ((* result .JSON200 )[0 ].Message , convey .ShouldEqual , "third commit" )
411413
412414 newResp , err := client .GetCommitsInRepository (ctx , userName , repoName , & api.GetCommitsInRepositoryParams {
413415 After : utils .Time ((* result .JSON200 )[0 ].CreatedAt ),
@@ -420,7 +422,7 @@ func RepoSpec(ctx context.Context, urlStr string) func(c convey.C) {
420422 newResult , err := api .ParseGetCommitsInRepositoryResponse (newResp )
421423 convey .So (err , convey .ShouldBeNil )
422424 convey .So (* newResult .JSON200 , convey .ShouldHaveLength , 1 )
423- convey .So ((* newResult .JSON200 )[0 ].Message , convey .ShouldEqual , "first commit" )
425+ convey .So ((* newResult .JSON200 )[0 ].Message , convey .ShouldEqual , "second commit" )
424426 })
425427 })
426428
0 commit comments