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
88a65aaf
Commit
88a65aaf
authored
Jan 14, 2011
by
Joost Baaij
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
added tests for filesystem storage
parent
1b8bb3c3
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
23 additions
and
0 deletions
+23
-0
test/storage_test.rb
+23
-0
No files found.
test/storage_test.rb
View file @
88a65aaf
...
...
@@ -8,6 +8,29 @@ class StorageTest < Test::Unit::TestCase
end
end
context
"filesystem"
do
setup
do
rebuild_model
:styles
=>
{
:thumbnail
=>
"25x25#"
}
@dummy
=
Dummy
.
create!
@dummy
.
avatar
=
File
.
open
(
File
.
join
(
File
.
dirname
(
__FILE__
),
"fixtures"
,
"5k.png"
))
end
should
"allow file assignment"
do
assert
@dummy
.
save
end
should
"store the original"
do
@dummy
.
save
assert
File
.
exists?
(
@dummy
.
avatar
.
path
)
end
should
"store the thumbnail"
do
@dummy
.
save
assert
File
.
exists?
(
@dummy
.
avatar
.
path
(
:thumbnail
))
end
end
context
"Parsing S3 credentials"
do
setup
do
AWS
::
S3
::
Base
.
stubs
(
:establish_connection!
)
...
...
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