fix ineffassign in Tests & set Version v0.13.0 (#345)

increment version

fix ineffassign

Co-authored-by: 6543 <6543@obermui.de>
Reviewed-on: https://gitea.com/gitea/go-sdk/pulls/345
Reviewed-by: Lunny Xiao <xiaolunwen@gmail.com>
Reviewed-by: Andrew Thornton <art27@cantab.net>
This commit is contained in:
6543 2020-05-27 13:04:51 +00:00
parent 567d2f8bbd
commit e7c56d8f50
6 changed files with 8 additions and 1 deletions

View file

@ -22,7 +22,7 @@ var jsonHeader = http.Header{"content-type": []string{"application/json"}}
// Version return the library version
func Version() string {
return "0.12.0"
return "0.13.0"
}
// Client represents a Gitea API client.

View file

@ -22,6 +22,7 @@ func TestIssueComment(t *testing.T) {
repo, err := createTestRepo(t, "TestIssueCommentRepo", c)
assert.NoError(t, err)
issue1, err := c.CreateIssue(user.UserName, repo.Name, CreateIssueOption{Title: "issue1", Body: "body", Closed: false})
assert.NoError(t, err)
assert.EqualValues(t, 1, issue1.Index)
issue2, err := c.CreateIssue(user.UserName, repo.Name, CreateIssueOption{Title: "issue1", Body: "body", Closed: false})
assert.EqualValues(t, 2, issue2.Index)

View file

@ -53,5 +53,6 @@ func TestMilestones(t *testing.T) {
_, err = c.GetMilestone(repo.Owner.UserName, repo.Name, m4.ID)
assert.Error(t, err)
m, err := c.GetMilestone(repo.Owner.UserName, repo.Name, m1.ID)
assert.NoError(t, err)
assert.EqualValues(t, m1, m)
}

View file

@ -36,6 +36,7 @@ func TestOrgMembership(t *testing.T) {
assert.True(t, check)
err = c.SetPublicOrgMembership(newOrg.UserName, user.UserName, true)
assert.NoError(t, err)
check, err = c.CheckPublicOrgMembership(newOrg.UserName, user.UserName)
assert.NoError(t, err)
assert.True(t, check)

View file

@ -58,6 +58,8 @@ func TestPullReview(t *testing.T) {
},
},
})
assert.NoError(t, err)
assert.NotNil(t, r3)
// ListPullReviews
c.SetSudo("")

View file

@ -104,6 +104,8 @@ func TestPull(t *testing.T) {
Title: "confl",
State: &state,
})
assert.NoError(t, err)
assert.EqualValues(t, state, pr.State)
pulls, err = c.ListRepoPullRequests(user.UserName, repoName, ListPullRequestsOptions{
State: StateClosed,