Added bike show api method

This commit is contained in:
Jason Denney
2014-03-08 15:03:52 -05:00
parent 523046b042
commit dc0a567a27
11 changed files with 111 additions and 10 deletions
+5
View File
@@ -0,0 +1,5 @@
FactoryGirl.define do
factory :bike_brand do
brand {Faker::Commerce.product_name}
end
end
+5
View File
@@ -0,0 +1,5 @@
FactoryGirl.define do
factory :bike_condition do
condition "POOR"
end
end
+5
View File
@@ -0,0 +1,5 @@
FactoryGirl.define do
factory :bike_purpose do
purpose "SHOP"
end
end
+5
View File
@@ -0,0 +1,5 @@
FactoryGirl.define do
factory :bike_style do
style {Faker::Commerce.product_name}
end
end
+12
View File
@@ -0,0 +1,12 @@
FactoryGirl.define do
factory :bike_wheel_size do
twmm 40
rdmm 635
twin "1 1/2 [1 3/8]"
rdin 28
twfr "38B [35B]"
rdfr 700
description "a big wheel"
tire_common_score 1
end
end
+17
View File
@@ -2,6 +2,23 @@
FactoryGirl.define do
factory :bike do
sequence(:shop_id) {|n| n}
sequence :serial_number do |n|
"#{Faker::Code.isbn}-#{n}"
end
bike_brand { FactoryGirl.create(:bike_brand) }
model { Faker::Commerce.product_name }
color "FFFFFF"
bike_style { FactoryGirl.create(:bike_style) }
seat_tube_height 42
top_tube_length 42
bike_wheel_size { FactoryGirl.create(:bike_wheel_size) }
value 200
bike_condition { FactoryGirl.create(:bike_condition) }
bike_purpose { FactoryGirl.create(:bike_purpose) }
end
factory :seed_bike do
sequence(:shop_id) {|n| n}
sequence :serial_number do |n|
"#{Faker::Code.isbn}-#{n}"