Sha256: 55737de5429d2d6f0e3d912e97707641d48c0f61abc895cf49837c1b5b209977
Contents?: true
Size: 524 Bytes
Versions: 8
Compression:
Stored size: 524 Bytes
Contents
require 'spec_helper' describe "Attachments" do with_tmp_spec_dir with_models with_files login_as :user before do @a = File.open("#{spec_dir}/a.txt") end after do @a.close if @a end it "smoke test" do item = Factory.create :item, name: 'my note', attachments_as_attachments: [@a] item.reload item.attachments.size.should == 1 # item.attachments.first.file.path.should =~ /\/my note\/a\.txt/ item.attachments.first.file.path.should =~ /\/#{item.id}\/a\.txt/ end end
Version data entries
8 entries across 8 versions & 1 rubygems