Skip to content

Commit

Permalink
fix failing gitlab and cc tests
Browse files Browse the repository at this point in the history
  • Loading branch information
bradrydzewski committed Sep 30, 2015
1 parent 6c81c9c commit 5d58658
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
8 changes: 5 additions & 3 deletions model/cc_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ package model

import (
"testing"
"time"

"github.com/franela/goblin"
)
Expand All @@ -12,22 +13,23 @@ func TestCC(t *testing.T) {
g.Describe("CC", func() {

g.It("Should create a project", func() {

now := time.Now().Unix()
now_fmt := time.Unix(now, 0).Format(time.RFC3339)
r := &Repo{
FullName: "foo/bar",
}
b := &Build{
Status: StatusSuccess,
Number: 1,
Started: 1442872675,
Started: now,
}
cc := NewCC(r, b, "http://localhost/foo/bar/1")

g.Assert(cc.Project.Name).Equal("foo/bar")
g.Assert(cc.Project.Activity).Equal("Sleeping")
g.Assert(cc.Project.LastBuildStatus).Equal("Success")
g.Assert(cc.Project.LastBuildLabel).Equal("1")
g.Assert(cc.Project.LastBuildTime).Equal("2015-09-21T14:57:55-07:00")
g.Assert(cc.Project.LastBuildTime).Equal(now_fmt)
g.Assert(cc.Project.WebURL).Equal("http://localhost/foo/bar/1")
})

Expand Down
2 changes: 1 addition & 1 deletion remote/gitlab/gitlab_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ func Test_Gitlab(t *testing.T) {
g.Assert(err == nil).IsTrue()
g.Assert(_repo.Name).Equal("diaspora-client")
g.Assert(_repo.Owner).Equal("diaspora")
g.Assert(_repo.Private).Equal(true)
g.Assert(_repo.IsPrivate).Equal(true)
})

g.It("Should return error, when repo not exist", func() {
Expand Down

0 comments on commit 5d58658

Please sign in to comment.