fix gitea file testing.

Signed-off-by: Bo-Yi Wu <appleboy.tw@gmail.com>
This commit is contained in:
Bo-Yi Wu 2017-05-23 23:36:18 +08:00
parent f186d4c898
commit 7f072e331a
No known key found for this signature in database
GPG key ID: 0F84B2110C500B1F

View file

@ -127,12 +127,6 @@ func Test_gitea(t *testing.T) {
g.Assert(string(raw)).Equal("{ platform: linux/amd64 }") g.Assert(string(raw)).Equal("{ platform: linux/amd64 }")
}) })
g.It("Should return a repository file from a ref", func() {
raw, err := c.File(fakeUser, fakeRepo, fakeBuildWithRef, ".drone.yml")
g.Assert(err == nil).IsTrue()
g.Assert(string(raw)).Equal("{ platform: linux/amd64 }")
})
g.It("Should return nil from send build status", func() { g.It("Should return nil from send build status", func() {
err := c.Status(fakeUser, fakeRepo, fakeBuild, "http://gitea.io") err := c.Status(fakeUser, fakeRepo, fakeBuild, "http://gitea.io")
g.Assert(err == nil).IsTrue() g.Assert(err == nil).IsTrue()
@ -186,8 +180,4 @@ var (
fakeBuild = &model.Build{ fakeBuild = &model.Build{
Commit: "9ecad50", Commit: "9ecad50",
} }
fakeBuildWithRef = &model.Build{
Ref: "refs/tags/v1.0.0",
}
) )