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
071dc598
Commit
071dc598
authored
Aug 01, 2008
by
Henrik N
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Also test that new_user.avatar = old_user.avatar nils with a nil avatar.
parent
009aba0b
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
16 additions
and
1 deletions
+16
-1
test/integration_test.rb
+16
-1
No files found.
test/integration_test.rb
View file @
071dc598
...
...
@@ -199,12 +199,15 @@ class IntegrationTest < Test::Unit::TestCase
assert_equal
"5k.png"
,
@dummy
.
avatar_file_name
end
should
"assign images from other Paperclips as well"
do
context
"that is assigned its file from another Paperclip attachment"
do
setup
do
@dummy2
=
Dummy
.
new
@file2
=
File
.
new
(
File
.
join
(
FIXTURES_DIR
,
"12k.png"
))
assert
@dummy2
.
avatar
=
@file2
@dummy2
.
save
end
should
"work when assigned a file"
do
assert_not_equal
`identify -format "%wx%h"
#{
@dummy
.
avatar
.
to_file
(
:original
).
path
}
`
,
`identify -format "%wx%h"
#{
@dummy2
.
avatar
.
to_file
(
:original
).
path
}
`
...
...
@@ -213,6 +216,18 @@ class IntegrationTest < Test::Unit::TestCase
assert_equal
`identify -format "%wx%h"
#{
@dummy
.
avatar
.
to_file
(
:original
).
path
}
`
,
`identify -format "%wx%h"
#{
@dummy2
.
avatar
.
to_file
(
:original
).
path
}
`
end
should
"work when assigned a nil file"
do
@dummy2
.
avatar
=
nil
@dummy2
.
save
@dummy
.
avatar
=
@dummy2
.
avatar
@dummy
.
save
assert
!
@dummy
.
avatar?
end
end
end
if
ENV
[
'S3_TEST_BUCKET'
]
...
...
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