Sha256: 2ceef31ca063dc7a2f41ea7c6cdaddafca37e4a60ec5ef536eba4cd4a85e5dfc
Contents?: true
Size: 646 Bytes
Versions: 33
Compression:
Stored size: 646 Bytes
Contents
require File.expand_path(File.dirname(__FILE__) + '/../spec_helper') describe "Trip" do before do stub_save_for_model(VendorDocument) end it "creates a vendor document attachment" do trip = Trip.new(:kid_date=>1,:kid_time=>2,:kid_user=>3,:kid_mult=>4,:kid_comm=>5) mock(Code).valid_value_for_group?(254, :aircraft_document) {true} doc = VendorDocument.new(:file_name_prefix=>"TRIP", :file_name=>"whatever", :doc_type_value=> 254, :trip_number=>111) doc.save() trip.add_attachment(doc) doc.kid_user.should == "ADMN" doc.image_name.should == "TRIP/whatever" doc.document_type.should == 254 end end
Version data entries
33 entries across 33 versions & 1 rubygems