-
Notifications
You must be signed in to change notification settings - Fork 21
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Alex
committed
Aug 26, 2016
1 parent
d8c20d2
commit 5eb509e
Showing
3 changed files
with
22 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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() { | ||
|
@@ -79,7 +97,7 @@ func TestClient(t *testing.T) { | |
c.context.Version = "goconvey" | ||
c.context.Tags = []string{"golang", "test"} | ||
c.context.CustomData = map[string]string{"foo": "bar"} | ||
c.context.User = "Test User" | ||
c.context.User = User { Identifier: "Test User" } | ||
defer c.HandleError() | ||
panic("Test: See if this works with Raygun") | ||
}) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters