Add modifiable context for Github status API

This commit is contained in:
Fabio Rapposelli
2016-05-27 20:22:32 +02:00
parent c888fb3152
commit 837446825d
4 changed files with 16 additions and 4 deletions

View File

@@ -37,6 +37,7 @@ func Test_github(t *testing.T) {
Password: "password",
SkipVerify: true,
PrivateMode: true,
Context: "continuous-integration/test",
})
g.Assert(remote.(*client).URL).Equal("http://localhost:8080")
g.Assert(remote.(*client).API).Equal("http://localhost:8080/api/v3/")
@@ -47,6 +48,7 @@ func Test_github(t *testing.T) {
g.Assert(remote.(*client).Secret).Equal("I1NiIsInR5")
g.Assert(remote.(*client).SkipVerify).Equal(true)
g.Assert(remote.(*client).PrivateMode).Equal(true)
g.Assert(remote.(*client).Context).Equal("continuous-integration/test")
})
g.It("Should handle malformed url", func() {
_, err := New(Opts{URL: "%gh&%ij"})