spec/twitter/saved_search_spec.rb in twitter-4.8.1 vs spec/twitter/saved_search_spec.rb in twitter-5.0.0.rc.1
- old
+ new
@@ -29,6 +29,17 @@
saved_search = Twitter::SavedSearch.new(:id => 16129012)
expect(saved_search.created_at).to be_nil
end
end
+ describe "#created?" do
+ it "returns true when created_at is set" do
+ saved_search = Twitter::SavedSearch.new(:id => 16129012, :created_at => "Mon Jul 16 12:59:01 +0000 2007")
+ expect(saved_search.created?).to be_true
+ end
+ it "returns false when created_at is not set" do
+ saved_search = Twitter::SavedSearch.new(:id => 16129012)
+ expect(saved_search.created?).to be_false
+ end
+ end
+
end