Skip to content

Commit

Permalink
update tests
Browse files Browse the repository at this point in the history
  • Loading branch information
Alex committed Aug 26, 2016
1 parent d8c20d2 commit 2c54acb
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 2 deletions.
20 changes: 19 additions & 1 deletion raygun4go_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,25 @@ func TestClient(t *testing.T) {
Convey("#User", func() {
u := "user"
c.User(u)
So(c.context.User, ShouldResemble, u)
So(c.context.User.Identifier, ShouldResemble, u)
})

Convey('#UserDetails', func() {
u := User {
Identifier: "user25",
IsAnonymous: false,
Email: "[email protected]",
FullName: "Robbie Raygun",
FirstName: "Robbie",
UUID: "123123-abcabc-123123"
}
c.UserDetails(u)
So(c.context.User.Identifier, ShouldEqual, u.Identifier)
So(c.context.User.IsAnonymous, ShouldEqual, u.IsAnonymous)
So(c.context.User.Email, ShouldEqual, u.Email)
So(c.context.User.FullName, ShouldEqual, u.FullName)
So(c.context.User.FirstName, ShouldEqual, u.FirstName)
So(c.context.User.UUID, ShouldEqual, u.UUID)
})

Convey("#HandleError", func() {
Expand Down
2 changes: 1 addition & 1 deletion request_data_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ func TestErrorData(t *testing.T) {

func TestUser(t *testing.T) {
Convey("has an exported identifier", t, func() {
u := user{"test"}
u := User { Identifier: "test" }
So(u.Identifier, ShouldEqual, "test")
})
}
Expand Down

0 comments on commit 2c54acb

Please sign in to comment.