Updated test dump and adapted specs

* We now have a second attachment, a simple text file
This commit is contained in:
Marc Remolt
2011-06-06 19:39:27 +02:00
parent 7550dfa164
commit 2581895c7c
3 changed files with 55 additions and 13 deletions

View File

@@ -4,7 +4,8 @@ describe Refinery::WordPress::Attachment, :type => :model do
let(:attachment) { test_dump.attachments.first }
specify { attachment.title.should == '200px-Tux.svg' }
specify { attachment.description.should == 'Tux, the Linux mascot' }
# doesn't get exported atm. for some reason
specify { attachment.description.should == '' }
specify { attachment.url.should == 'http://localhost/wordpress/wp-content/uploads/2011/05/200px-Tux.svg_.png' }
specify { attachment.file_name.should == '200px-Tux.svg_.png' }
specify { attachment.post_date.should == DateTime.new(2011, 6, 5, 15, 26, 51) }

View File

@@ -77,7 +77,7 @@ describe Refinery::WordPress::Dump, :type => :model do
describe "#attachments" do
it "should return all attachments" do
dump.attachments.should have(1).attachment
dump.attachments.should have(2).attachments
end
specify { dump.attachments.first.should be_a(Refinery::WordPress::Attachment) }