Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
V
venshop
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
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
huanvl
venshop
Commits
d04b2354
Commit
d04b2354
authored
Oct 28, 2013
by
vulehuan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
rspec - product - temp
parent
78a4c073
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
84 additions
and
0 deletions
+84
-0
venshop_app/spec/models/product_spec.rb
+62
-0
venshop_app/spec/requests/product_pages_spec.rb
+22
-0
No files found.
venshop_app/spec/models/product_spec.rb
View file @
d04b2354
require
'spec_helper'
require
'spec_helper'
describe
Product
do
describe
Product
do
before
do
@product
=
Product
.
new
(
name:
"Example User"
,
description:
"user@example.com"
,
headline:
"foobar"
,
availability:
"foobar"
,
code:
''
,
condition:
''
,
image_small:
''
,
image_medium:
''
,
review_rate:
0
,
review_count:
0
,
price_currency:
''
,
price:
0
,
product_category_id:
0
,
user_id:
0
,
status:
1
)
end
subject
{
@product
}
it
{
should
respond_to
(
:name
)
}
it
{
should
respond_to
(
:description
)
}
it
{
should
respond_to
(
:headline
)
}
it
{
should
respond_to
(
:availability
)
}
it
{
should
respond_to
(
:code
)
}
it
{
should
respond_to
(
:condition
)
}
it
{
should
respond_to
(
:image_small
)
}
it
{
should
respond_to
(
:image_medium
)
}
it
{
should
respond_to
(
:review_rate
)
}
it
{
should
respond_to
(
:review_count
)
}
it
{
should
respond_to
(
:price_currency
)
}
it
{
should
respond_to
(
:price
)
}
it
{
should
respond_to
(
:product_category_id
)
}
it
{
should
respond_to
(
:user_id
)
}
it
{
should
respond_to
(
:status
)
}
it
{
should
be_valid
}
describe
"when name is not present"
do
end
describe
"when name is too long"
do
end
describe
"when image medium is not present"
do
end
describe
"when price is not a number"
do
end
describe
"when product category is not exist"
do
end
describe
"when user is not exist"
do
end
end
end
venshop_app/spec/requests/product_pages_spec.rb
0 → 100644
View file @
d04b2354
require
'spec_helper'
describe
"Products Page"
do
subject
{
page
}
describe
"index page"
do
end
describe
"product page"
do
end
describe
"category page"
do
end
describe
"detail page"
do
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