Skip to content

Instantly share code, notes, and snippets.

it "should move a list of file ids and destination folders" do
filebox = mock_model(Filebox)
folder = Folder.create!(:name => "origin_folder", :filebox => @filebox)
dest_folder = Folder.create!(:name => "destination_folder", :filebox => @filebox)
to_move = []
user_files = []
test_files = ["test_data_1.txt", "test_data_2.txt", "test_data_3.txt"]
test_files.each do |test_file|
temp_file = mock("UploadedTempFile", :original_filename => test_file,
:read => "my file contents",