# Copyright 2012 Trustees of FreeBMD
# 
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
# 
# http://www.apache.org/licenses/LICENSE-2.0
# 
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
# 
require 'spec_helper'

describe ImageUploadLog do

#   
  # it "should create a logfile when its created" do
    # iu = Upload.create(:upload_path => "/tmp")
    # iu.image_upload_log.last.should be_an_instance_of(ImageUploadLog)
    # fn = iu.image_upload_log.last.file
    # iu.image_upload_log.last.read.should match /created/
  # end
# 
  # it "should be accessible from child objects" do
    # # set up the object heirarchy
    # iu = Upload.create(:upload_path => SIMPLE_DIR)
    # my_log = iu.image_upload_log.last
#     
    # iu.copy_to_originals_dir
    # iu.process_originals_dir(iu.originals_dir)
# 
#     
    # iu.image_dir.last.log("LOGGEDFROMDIR")
    # my_log.read.should match /LOGGEDFROMDIR/
#     
    # iu.image_dir.last.image_file.last.log("LOGGEDFROMFILE")
    # my_log.read.should match /LOGGEDFROMFILE/
  # end
  


end
