Sha256: 0103aeb9c89892ff294370fa77bb6b4123708aa3d39fbfd5bf71471dc7776223
Contents?: true
Size: 713 Bytes
Versions: 18
Compression:
Stored size: 713 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) arr = [] mock(VendorDocument).get_all_types {arr} mock(arr).find {OpenStruct.new(:value=>"fake_doc_type")} doc = VendorDocument.new(:doc_filename_prefix=>"TRIP", :doc_filename=>"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 == "fake_doc_type" end end
Version data entries
18 entries across 18 versions & 1 rubygems