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
dbb7e043
Commit
dbb7e043
authored
Jul 29, 2013
by
Jon Yurek
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Test for .attachment_definitions
parent
ceb43f1a
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
13 additions
and
1 deletions
+13
-1
lib/paperclip/has_attached_file.rb
+1
-1
test/attachment_definitions_test.rb
+12
-0
No files found.
lib/paperclip/has_attached_file.rb
View file @
dbb7e043
...
...
@@ -92,7 +92,7 @@ module Paperclip
module
ClassMethods
def
attachment_definitions
Paperclip
::
AttachmentRegistry
.
definitions_for
(
self
.
class
)
Paperclip
::
AttachmentRegistry
.
definitions_for
(
self
)
end
end
end
...
...
test/attachment_definitions_test.rb
0 → 100644
View file @
dbb7e043
require
'./test/helper'
class
AttachmentDefinitionsTest
<
Test
::
Unit
::
TestCase
should
'return all of the attachments on the class'
do
reset_class
"Dummy"
Dummy
.
has_attached_file
:avatar
,
{
:path
=>
"abc"
}
Dummy
.
has_attached_file
:other_attachment
,
{
:url
=>
"123"
}
expected
=
{
:avatar
=>
{
:path
=>
"abc"
},
:other_attachment
=>
{
:url
=>
"123"
}}
assert_equal
expected
,
Dummy
.
attachment_definitions
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