Sha256: 52241023b37cd86707c6412c85b850cb37ef3c7003f0f5c5bb5a1a5c8315ba85
Contents?: true
Size: 1.3 KB
Versions: 12
Compression:
Stored size: 1.3 KB
Contents
require 'spec_helper' describe GenericFile do before do subject.apply_depositor_metadata('jcoyne') end describe "terms_for_editing" do it "should return a list" do subject.terms_for_editing.should == [:resource_type, :title, :creator, :contributor, :description, :tag, :rights, :publisher, :date_created, :subject, :language, :identifier, :based_near, :related_url] end end describe "terms_for_display" do it "should return a list" do subject.terms_for_display.should == [:part_of, :resource_type, :title, :creator, :contributor, :description, :tag, :rights, :publisher, :date_created, :date_uploaded, :date_modified, :subject, :language, :identifier, :based_near, :related_url] end end describe "accessible_attributes" do it "should have a list" do subject.accessible_attributes.should == [:part_of, :resource_type, :title, :creator, :contributor, :description, :tag, :rights, :publisher, :date_created, :date_uploaded, :date_modified, :subject, :language, :identifier, :based_near, :related_url, :permissions] end it "should sanitize them" do subject.sanitize_attributes({'part_of' => 'A book', 'something_crazy' => "get's thrown out"}).should == {'part_of' => 'A book'} end end end
Version data entries
12 entries across 12 versions & 1 rubygems