Sha256: 19acf051959b0fdadc50692e0edfabf5a0effb6902507ffc22e6f9c91445063d
Contents?: true
Size: 1.11 KB
Versions: 2
Compression:
Stored size: 1.11 KB
Contents
#collection_spec.rb require 'test_constants' describe ::Atom::Collection do it "Get the test collection, post an entry to it" do current_collection = ::Atom::Collection.new(TEST_COLLECTION_HREF, TEST_CONNECTION_VALID) current_collection.should_not be_nil current_collection.href.should == TEST_COLLECTION_HREF current_collection.collection_uri.should == TEST_COLLECTION_HREF current_feed = current_collection.feed current_feed.update! current_feed.entries.count.should >= 0 entry = Atom::Entry.new() entry.title = "Test Entry created by Sword2Ruby Collection test" entry.summary = "This entry was created during a test on #{Time.now}" entry.updated = Time.now #Generate a slug based on the date and time current_slug = "sword2ruby_test_#{Time.now.strftime("%FT%H-%M-%S")}" deposit_receipt = current_collection.post!(:entry=>entry, :slug=>current_slug, :in_progress=>false) #There SHOULD be a deposit receipt entry received from the Sword server deposit_receipt.has_entry.should == true deposit_receipt.entry.should_not be_nil end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
sword2ruby-1.0.1 | spec/collection_spec.rb |
sword2ruby-1.0.0 | spec/collection_spec.rb |