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
b2cac53d
Commit
b2cac53d
authored
Sep 23, 2011
by
Prem Sichanugrist
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove whitespaces
parent
d18d814d
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
11 deletions
+11
-11
test/storage_test.rb
+11
-11
No files found.
test/storage_test.rb
View file @
b2cac53d
...
...
@@ -362,7 +362,7 @@ class StorageTest < Test::Unit::TestCase
File
.
stubs
(
:exist?
).
returns
(
true
)
Paperclip
::
Tempfile
.
any_instance
.
expects
(
:close
).
at_least_once
()
Paperclip
::
Tempfile
.
any_instance
.
expects
(
:unlink
).
at_least_once
()
@dummy
.
save!
end
...
...
@@ -494,7 +494,7 @@ class StorageTest < Test::Unit::TestCase
assert_equal
'env_secret'
,
AWS
::
S3
::
Base
.
connection
.
options
[
:secret_access_key
]
end
end
context
"S3 Permissions"
do
context
"defaults to public-read"
do
setup
do
...
...
@@ -545,16 +545,16 @@ class StorageTest < Test::Unit::TestCase
},
:s3_permissions
=>
'private'
end
context
"when assigned"
do
setup
do
@file
=
File
.
new
(
File
.
join
(
File
.
dirname
(
__FILE__
),
'fixtures'
,
'5k.png'
),
'rb'
)
@dummy
=
Dummy
.
new
@dummy
.
avatar
=
@file
end
teardown
{
@file
.
close
}
context
"and saved"
do
setup
do
AWS
::
S3
::
Base
.
stubs
(
:establish_connection!
)
...
...
@@ -565,14 +565,14 @@ class StorageTest < Test::Unit::TestCase
:access
=>
'private'
)
@dummy
.
save
end
should
"succeed"
do
assert
true
end
end
end
end
context
"hash permissions set"
do
setup
do
rebuild_model
:storage
=>
:s3
,
...
...
@@ -590,16 +590,16 @@ class StorageTest < Test::Unit::TestCase
:thumb
=>
'public-read'
}
end
context
"when assigned"
do
setup
do
@file
=
File
.
new
(
File
.
join
(
File
.
dirname
(
__FILE__
),
'fixtures'
,
'5k.png'
),
'rb'
)
@dummy
=
Dummy
.
new
@dummy
.
avatar
=
@file
end
teardown
{
@file
.
close
}
context
"and saved"
do
setup
do
AWS
::
S3
::
Base
.
stubs
(
:establish_connection!
)
...
...
@@ -612,7 +612,7 @@ class StorageTest < Test::Unit::TestCase
end
@dummy
.
save
end
should
"succeed"
do
assert
true
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