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
81129ad1
Commit
81129ad1
authored
Dec 12, 2011
by
Prem Sichanugrist
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Do not calling `AWS.stub!` right away, it's leaking to S3LiveTest
parent
128d664c
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
7 deletions
+8
-7
test/storage/s3_live_test.rb
+0
-4
test/storage/s3_test.rb
+8
-3
No files found.
test/storage/s3_live_test.rb
View file @
81129ad1
...
...
@@ -80,8 +80,6 @@ unless ENV["S3_BUCKET"].blank?
@dummy
.
save
end
teardown
{
@dummy
.
destroy
}
should
"return an unescaped version for path"
do
assert_match
/.+\/spaced file\.png/
,
@dummy
.
avatar
.
path
end
...
...
@@ -114,8 +112,6 @@ unless ENV["S3_BUCKET"].blank?
@dummy
.
save
end
teardown
{
@dummy
.
destroy
}
should
"return an unescaped version for path"
do
assert_match
/.+\/question\?mark\.png/
,
@dummy
.
avatar
.
path
end
...
...
test/storage/s3_test.rb
View file @
81129ad1
require
'./test/helper'
require
'aws'
AWS
.
stub!
AWS
.
config
(
:access_key_id
=>
"TESTKEY"
,
:secret_access_key
=>
"TESTSECRET"
)
class
S3Test
<
Test
::
Unit
::
TestCase
def
rails_env
(
env
)
silence_warnings
do
...
...
@@ -11,6 +8,14 @@ class S3Test < Test::Unit::TestCase
end
end
def
setup
AWS
.
config
(
:access_key_id
=>
"TESTKEY"
,
:secret_access_key
=>
"TESTSECRET"
,
:stub_requests
=>
true
)
end
def
teardown
AWS
.
config
(
:access_key_id
=>
nil
,
:secret_access_key
=>
nil
,
:stub_requests
=>
nil
)
end
context
"Parsing S3 credentials"
do
setup
do
@proxy_settings
=
{
:host
=>
"127.0.0.1"
,
:port
=>
8888
,
:user
=>
"foo"
,
:password
=>
"bar"
}
...
...
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