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
1ded077b
Commit
1ded077b
authored
May 10, 2012
by
Mark Kremer
Committed by
Mike Burns
May 31, 2012
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Re-arranged the cucumber features
parent
0354f662
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
13 deletions
+12
-13
features/basic_integration.feature
+12
-13
No files found.
features/basic_integration.feature
View file @
1ded077b
...
...
@@ -8,12 +8,15 @@ Feature: Rails integration
And
I update my new user view to include the file upload field
And
I update my user view to include the attachment
Scenario
:
Filesystem integration test
Scenario
:
Configure defaults for all attachments through Railtie
Given I add this snippet to config/application.rb
:
"""
config.paperclip_defaults = {:url => "/paperclip/custom/:attachment/:style/:filename"}
"""
Given I add this snippet to the User model
:
"""
attr_accessible :name, :attachment
has_attached_file :attachment, :url => "/system/:attachment/:style/:filename",
:styles => { :square => "100x100#" }
has_attached_file :attachment
"""
And
I start the rails application
When
I go to the new user page
...
...
@@ -21,18 +24,14 @@ Feature: Rails integration
And
I attach the file
"test/fixtures/5k.png"
to
"Attachment"
And
I press
"Submit"
Then I should see "Name
:
something"
And
I should see an image with a path of
"/
syste
m/attachments/original/5k.png"
And
the file at
"/
syste
m/attachments/original/5k.png"
should be the same as
"test/fixtures/5k.png"
And
I should see an image with a path of
"/
paperclip/custo
m/attachments/original/5k.png"
And
the file at
"/
paperclip/custo
m/attachments/original/5k.png"
should be the same as
"test/fixtures/5k.png"
Scenario
:
Configure defaults for all attachments through Railtie
Given I add this snippet to config/application.rb
:
"""
config.paperclip_defaults = {:url => "/paperclip/custom/:attachment/:style/:filename"}
"""
Scenario
:
Filesystem integration test
Given I add this snippet to the User model
:
"""
attr_accessible :name, :attachment
has_attached_file :attachment
has_attached_file :attachment
, :url => "/system/:attachment/:style/:filename"
"""
And
I start the rails application
When
I go to the new user page
...
...
@@ -40,8 +39,8 @@ Feature: Rails integration
And
I attach the file
"test/fixtures/5k.png"
to
"Attachment"
And
I press
"Submit"
Then I should see "Name
:
something"
And
I should see an image with a path of
"/
paperclip/custo
m/attachments/original/5k.png"
And
the file at
"/
paperclip/custo
m/attachments/original/5k.png"
should be the same as
"test/fixtures/5k.png"
And
I should see an image with a path of
"/
syste
m/attachments/original/5k.png"
And
the file at
"/
syste
m/attachments/original/5k.png"
should be the same as
"test/fixtures/5k.png"
Scenario
:
S3 Integration test
Given I add this snippet to the User model
:
...
...
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