Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
P
paperclip
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
ikcrm_common
paperclip
Commits
a394c73b
Commit
a394c73b
authored
Jul 04, 2012
by
Tom Counsell
Committed by
Prem Sichanugrist
Jul 13, 2012
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Test for #947 copying attachments between models should succeed when the attachment is empty
parent
813c8c8f
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
17 additions
and
0 deletions
+17
-0
test/integration_test.rb
+17
-0
No files found.
test/integration_test.rb
View file @
a394c73b
...
...
@@ -640,4 +640,21 @@ class IntegrationTest < Test::Unit::TestCase
end
end
end
context
"Copying attachment between models"
do
setup
do
rebuild_model
@file
=
File
.
new
(
fixture_file
(
"5k.png"
),
'rb'
)
end
teardown
{
@file
.
close
}
should
"should succeed when attachment is empty"
do
original
=
Dummy
.
create!
copy
=
Dummy
.
new
copy
.
avatar
=
original
.
avatar
copy
.
save
assert
!
copy
.
avatar
.
present?
end
end
end
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment