-
Notifications
You must be signed in to change notification settings - Fork 259
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fixed issue where attachments were not correctly saving due to versio…
…ning behavior
- Loading branch information
Showing
11 changed files
with
258 additions
and
171 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
# Used to expose behavior to the console in a single statement... | ||
# require 'test/console_helper' | ||
# | ||
require 'test/test_file' | ||
Cms.activate_logging |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
module Cms | ||
|
||
# Simplified handling for creating files for writing tests around multipart uploads. | ||
module TestFile | ||
FILES_DIR = File.dirname(__FILE__) + '/fixtures/multipart' | ||
|
||
# Creates a file to test uploading to a sample file. | ||
def self.new_file(file_name='foo.jpg', content_type="image/jpeg") | ||
Rack::Test::UploadedFile.new("#{FILES_DIR}/#{file_name}", content_type, false) | ||
end | ||
end | ||
|
||
# For activating logging on the console | ||
def self.activate_logging | ||
ActiveRecord::Base.logger = Logger.new(STDOUT) | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.