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
05909057
Commit
05909057
authored
May 18, 2012
by
Juanjo Bazán
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
More fine-grained tests for thumbnail.
parent
169dee4d
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
12 deletions
+9
-12
test/thumbnail_test.rb
+9
-12
No files found.
test/thumbnail_test.rb
View file @
05909057
...
...
@@ -113,10 +113,9 @@ class ThumbnailTest < Test::Unit::TestCase
end
should
"send the right command to convert when sent #make"
do
Paperclip
.
expects
(
:run
).
with
do
|*
arg
|
arg
[
0
]
==
'convert'
&&
arg
[
1
]
==
':source -resize "x50" -crop "100x50+114+0" +repage :dest'
&&
arg
[
2
][
:source
]
==
"
#{
File
.
expand_path
(
@thumb
.
file
.
path
)
}
[0]"
@thumb
.
expects
(
:convert
).
with
do
|*
arg
|
arg
[
0
]
==
':source -resize "x50" -crop "100x50+114+0" +repage :dest'
&&
arg
[
1
][
:source
]
==
"
#{
File
.
expand_path
(
@thumb
.
file
.
path
)
}
[0]"
end
@thumb
.
make
end
...
...
@@ -139,10 +138,9 @@ class ThumbnailTest < Test::Unit::TestCase
end
should
"send the right command to convert when sent #make"
do
Paperclip
.
expects
(
:run
).
with
do
|*
arg
|
arg
[
0
]
==
'convert'
&&
arg
[
1
]
==
'-strip :source -resize "x50" -crop "100x50+114+0" +repage :dest'
&&
arg
[
2
][
:source
]
==
"
#{
File
.
expand_path
(
@thumb
.
file
.
path
)
}
[0]"
@thumb
.
expects
(
:convert
).
with
do
|*
arg
|
arg
[
0
]
==
'-strip :source -resize "x50" -crop "100x50+114+0" +repage :dest'
&&
arg
[
1
][
:source
]
==
"
#{
File
.
expand_path
(
@thumb
.
file
.
path
)
}
[0]"
end
@thumb
.
make
end
...
...
@@ -181,10 +179,9 @@ class ThumbnailTest < Test::Unit::TestCase
end
should
"send the right command to convert when sent #make"
do
Paperclip
.
expects
(
:run
).
with
do
|*
arg
|
arg
[
0
]
==
'convert'
&&
arg
[
1
]
==
':source -resize "x50" -crop "100x50+114+0" +repage -strip -depth 8 :dest'
&&
arg
[
2
][
:source
]
==
"
#{
File
.
expand_path
(
@thumb
.
file
.
path
)
}
[0]"
@thumb
.
expects
(
:convert
).
with
do
|*
arg
|
arg
[
0
]
==
':source -resize "x50" -crop "100x50+114+0" +repage -strip -depth 8 :dest'
&&
arg
[
1
][
:source
]
==
"
#{
File
.
expand_path
(
@thumb
.
file
.
path
)
}
[0]"
end
@thumb
.
make
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