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
...
@@ -362,7 +362,7 @@ class StorageTest < Test::Unit::TestCase
File
.
stubs
(
:exist?
).
returns
(
true
)
File
.
stubs
(
:exist?
).
returns
(
true
)
Paperclip
::
Tempfile
.
any_instance
.
expects
(
:close
).
at_least_once
()
Paperclip
::
Tempfile
.
any_instance
.
expects
(
:close
).
at_least_once
()
Paperclip
::
Tempfile
.
any_instance
.
expects
(
:unlink
).
at_least_once
()
Paperclip
::
Tempfile
.
any_instance
.
expects
(
:unlink
).
at_least_once
()
@dummy
.
save!
@dummy
.
save!
end
end
...
@@ -494,7 +494,7 @@ class StorageTest < Test::Unit::TestCase
...
@@ -494,7 +494,7 @@ class StorageTest < Test::Unit::TestCase
assert_equal
'env_secret'
,
AWS
::
S3
::
Base
.
connection
.
options
[
:secret_access_key
]
assert_equal
'env_secret'
,
AWS
::
S3
::
Base
.
connection
.
options
[
:secret_access_key
]
end
end
end
end
context
"S3 Permissions"
do
context
"S3 Permissions"
do
context
"defaults to public-read"
do
context
"defaults to public-read"
do
setup
do
setup
do
...
@@ -545,16 +545,16 @@ class StorageTest < Test::Unit::TestCase
...
@@ -545,16 +545,16 @@ class StorageTest < Test::Unit::TestCase
},
},
:s3_permissions
=>
'private'
:s3_permissions
=>
'private'
end
end
context
"when assigned"
do
context
"when assigned"
do
setup
do
setup
do
@file
=
File
.
new
(
File
.
join
(
File
.
dirname
(
__FILE__
),
'fixtures'
,
'5k.png'
),
'rb'
)
@file
=
File
.
new
(
File
.
join
(
File
.
dirname
(
__FILE__
),
'fixtures'
,
'5k.png'
),
'rb'
)
@dummy
=
Dummy
.
new
@dummy
=
Dummy
.
new
@dummy
.
avatar
=
@file
@dummy
.
avatar
=
@file
end
end
teardown
{
@file
.
close
}
teardown
{
@file
.
close
}
context
"and saved"
do
context
"and saved"
do
setup
do
setup
do
AWS
::
S3
::
Base
.
stubs
(
:establish_connection!
)
AWS
::
S3
::
Base
.
stubs
(
:establish_connection!
)
...
@@ -565,14 +565,14 @@ class StorageTest < Test::Unit::TestCase
...
@@ -565,14 +565,14 @@ class StorageTest < Test::Unit::TestCase
:access
=>
'private'
)
:access
=>
'private'
)
@dummy
.
save
@dummy
.
save
end
end
should
"succeed"
do
should
"succeed"
do
assert
true
assert
true
end
end
end
end
end
end
end
end
context
"hash permissions set"
do
context
"hash permissions set"
do
setup
do
setup
do
rebuild_model
:storage
=>
:s3
,
rebuild_model
:storage
=>
:s3
,
...
@@ -590,16 +590,16 @@ class StorageTest < Test::Unit::TestCase
...
@@ -590,16 +590,16 @@ class StorageTest < Test::Unit::TestCase
:thumb
=>
'public-read'
:thumb
=>
'public-read'
}
}
end
end
context
"when assigned"
do
context
"when assigned"
do
setup
do
setup
do
@file
=
File
.
new
(
File
.
join
(
File
.
dirname
(
__FILE__
),
'fixtures'
,
'5k.png'
),
'rb'
)
@file
=
File
.
new
(
File
.
join
(
File
.
dirname
(
__FILE__
),
'fixtures'
,
'5k.png'
),
'rb'
)
@dummy
=
Dummy
.
new
@dummy
=
Dummy
.
new
@dummy
.
avatar
=
@file
@dummy
.
avatar
=
@file
end
end
teardown
{
@file
.
close
}
teardown
{
@file
.
close
}
context
"and saved"
do
context
"and saved"
do
setup
do
setup
do
AWS
::
S3
::
Base
.
stubs
(
:establish_connection!
)
AWS
::
S3
::
Base
.
stubs
(
:establish_connection!
)
...
@@ -612,7 +612,7 @@ class StorageTest < Test::Unit::TestCase
...
@@ -612,7 +612,7 @@ class StorageTest < Test::Unit::TestCase
end
end
@dummy
.
save
@dummy
.
save
end
end
should
"succeed"
do
should
"succeed"
do
assert
true
assert
true
end
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