Skip to content

Commit 0ac0fb0

Browse files
committed
Compare unix timestamps instead
1 parent fd03b57 commit 0ac0fb0

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

pastebin_test.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -120,8 +120,8 @@ func TestClient_GetAllUserPastes(t *testing.T) {
120120
if ExpectedVisibility := VisibilityUnlisted; pastes[0].Visibility != ExpectedVisibility {
121121
t.Errorf("Expected Visibility to be '%d', got '%d'", ExpectedVisibility, pastes[0].Visibility)
122122
}
123-
if ExpectedDate := "2012-06-02 11:44:45 -0400 EDT"; pastes[0].Date.String() != ExpectedDate {
124-
t.Errorf("Expected Date to be '%s', got '%s'", ExpectedDate, pastes[0].Date.String())
123+
if ExpectedDate := int64(1338651885); pastes[0].Date.Unix() != ExpectedDate {
124+
t.Errorf("Expected Date to be '%d', got '%d'", ExpectedDate, pastes[0].Date.Unix())
125125
}
126126
}
127127

0 commit comments

Comments
 (0)