Sha256: 5f1e9ef098b756df7af4b5fe7eaa51a3cf1b5e071b1ea0e19b840ab0c677c28e
Contents?: true
Size: 910 Bytes
Versions: 16
Compression:
Stored size: 910 Bytes
Contents
require 'helper' class TestPosting < Test::Unit::TestCase should "create posting with empty images array" do posting = Posting.new assert_equal [], posting.images assert_equal({}, posting.annotations) end should "create posting with empty status attribute" do posting = Posting.new assert_equal StatusUpdateRequest, posting.status.class assert_equal String, posting.status.event.class assert_equal Hash, posting.status.attributes.class assert_equal Array, posting.status.errors.class end should "create posting with not empty images array" do posting = Posting.new( :images => ["image_path"], :history => ["old_posting"], :annotations => {'annotation' => "value"} ) assert_equal ["image_path"], posting.images assert_equal ["old_posting"], posting.history assert_equal({'annotation' => "value"}, posting.annotations) end end
Version data entries
16 entries across 16 versions & 1 rubygems