Skip to content
This repository has been archived by the owner on Sep 29, 2020. It is now read-only.

Commit

Permalink
spec-edited-and-draft-parsing
Browse files Browse the repository at this point in the history
Spec for app:edited and app:draft parsing

darcs-hash:20080202151554-c5cc1-6dd6e05f388295548315c55d5e0ecae44e863173.gz
  • Loading branch information
sr committed Feb 2, 2008
1 parent 4a2d2ca commit 0268101
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 1 deletion.
8 changes: 8 additions & 0 deletions spec/entry_spec.rb
Expand Up @@ -44,6 +44,14 @@
@entry.published.should == Time.parse('2003-12-13T08:29:29-04:00')
end

it 'should parse app:edited correctly' do
@entry.edited.should == Time.parse('2005-07-31T12:29:29Z')
end

it 'should parse app:control/draft correctly' do
@entry.draft?.should be_true
end

it 'should parse rights correctly' do
@entry.rights.should be_an_instance_of(Atom::Text)
@entry.rights['type'].should == 'text'
Expand Down
5 changes: 4 additions & 1 deletion spec/fixtures/entry.xml
@@ -1,4 +1,5 @@
<entry xmlns="http://www.w3.org/2005/Atom">
<entry xmlns="http://www.w3.org/2005/Atom"
xmlns:app="http://www.w3.org/2007/app">
<title>Atom draft-07 snapshot</title>
<link rel="alternate" type="text/html"
href="http://example.org/2005/04/02/atom"/>
Expand All @@ -8,6 +9,8 @@
<id>tag:example.org,2003:3.2397</id>
<updated>2005-07-31T12:29:29Z</updated>
<published>2003-12-13T08:29:29-04:00</published>
<app:edited>2005-07-31T12:29:29Z</app:edited>
<app:control><app:draft>yes</app:draft></app:control>
<author>
<name>Mark Pilgrim</name>
<uri>http://example.org/</uri>
Expand Down

0 comments on commit 0268101

Please sign in to comment.