test/pocket/article_test.rb in pocket-ruby-0.2.0 vs test/pocket/article_test.rb in pocket-ruby-0.2.1

- old
+ new

@@ -97,19 +97,29 @@ test "time_read is nil if field is not present" do parsed_response.delete("time_read") assert_nil article.time_read end + test "time_read is nil if field is zero" do + parsed_response["time_read"] = "0" + assert_nil article.time_read + end + test "favorited?" do assert article.favorited? end test "time_favorited" do assert_equal Time.utc(2021, 4, 3, 1, 23, 15), article.time_favorited end test "time_favorited is nil if field not present" do parsed_response.delete("time_favorited") + assert_nil article.time_favorited + end + + test "time_favorited is nil if field is zero" do + parsed_response["time_favorited"] = "0" assert_nil article.time_favorited end test "read?" do assert article.read?