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
64549cb4
Commit
64549cb4
authored
Oct 21, 2011
by
Prem Sichanugrist
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix spacing problem
parent
774cee15
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
20 additions
and
20 deletions
+20
-20
test/storage/s3_test.rb
+20
-20
No files found.
test/storage/s3_test.rb
View file @
64549cb4
...
...
@@ -464,26 +464,26 @@ class S3Test < Test::Unit::TestCase
end
context
"with S3 credentials supplied as Pathname"
do
setup
do
ENV
[
'S3_KEY'
]
=
'pathname_key'
ENV
[
'S3_BUCKET'
]
=
'pathname_bucket'
ENV
[
'S3_SECRET'
]
=
'pathname_secret'
rails_env
(
'test'
)
rebuild_model
:storage
=>
:s3
,
:s3_credentials
=>
Pathname
.
new
(
File
.
join
(
File
.
dirname
(
__FILE__
))).
join
(
"../fixtures/s3.yml"
)
Dummy
.
delete_all
@dummy
=
Dummy
.
new
@dummy
.
avatar
.
send
(
:establish_connection!
)
end
should
"parse the credentials"
do
assert_equal
'pathname_bucket'
,
@dummy
.
avatar
.
bucket_name
assert_equal
'pathname_key'
,
AWS
::
S3
::
Base
.
connection
.
options
[
:access_key_id
]
assert_equal
'pathname_secret'
,
AWS
::
S3
::
Base
.
connection
.
options
[
:secret_access_key
]
end
setup
do
ENV
[
'S3_KEY'
]
=
'pathname_key'
ENV
[
'S3_BUCKET'
]
=
'pathname_bucket'
ENV
[
'S3_SECRET'
]
=
'pathname_secret'
rails_env
(
'test'
)
rebuild_model
:storage
=>
:s3
,
:s3_credentials
=>
Pathname
.
new
(
File
.
join
(
File
.
dirname
(
__FILE__
))).
join
(
"../fixtures/s3.yml"
)
Dummy
.
delete_all
@dummy
=
Dummy
.
new
@dummy
.
avatar
.
send
(
:establish_connection!
)
end
should
"parse the credentials"
do
assert_equal
'pathname_bucket'
,
@dummy
.
avatar
.
bucket_name
assert_equal
'pathname_key'
,
AWS
::
S3
::
Base
.
connection
.
options
[
:access_key_id
]
assert_equal
'pathname_secret'
,
AWS
::
S3
::
Base
.
connection
.
options
[
:secret_access_key
]
end
end
context
"with S3 credentials in a YAML file"
do
...
...
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