./test/hatom_test.rb in mofo-0.2.14 vs ./test/hatom_test.rb in mofo-0.2.15

- old
+ new

@@ -13,9 +13,23 @@ specify "should have an author string " do $hentry.author.should.be.an.instance_of HCard $hentry.author.fn.should.equal "Chris" end + specify "should have an author when there are no entry author but a nearest in parent hcard" do + with_parent = HEntry.find(:first => fixture(:redflavor), + :base => 'http://journal.redflavor.com') + with_parent.author.should.be.an.instance_of HCard + with_parent.author.fn.should.equal "Eivind Uggedal" + with_parent.author.url.should.equal "http://redflavor.com" + end + + specify "should be invalid without any author in strict mode" do + proc { HEntry.find(:first => fixture(:hatom_without_author), + :base => 'http://bogus.redflavor.com', + :strict => true) }.should.raise InvalidMicroformat + end + specify "should have content" do $hentry.entry_content.should.be.an.instance_of String end specify "should have an attached published date object" do