mirror of
https://github.com/fspc/BikeShed-1.git
synced 2026-09-16 08:31:36 -04:00
Added bike show api method
This commit is contained in:
@@ -0,0 +1,5 @@
|
||||
FactoryGirl.define do
|
||||
factory :bike_brand do
|
||||
brand {Faker::Commerce.product_name}
|
||||
end
|
||||
end
|
||||
@@ -0,0 +1,5 @@
|
||||
FactoryGirl.define do
|
||||
factory :bike_condition do
|
||||
condition "POOR"
|
||||
end
|
||||
end
|
||||
@@ -0,0 +1,5 @@
|
||||
FactoryGirl.define do
|
||||
factory :bike_purpose do
|
||||
purpose "SHOP"
|
||||
end
|
||||
end
|
||||
@@ -0,0 +1,5 @@
|
||||
FactoryGirl.define do
|
||||
factory :bike_style do
|
||||
style {Faker::Commerce.product_name}
|
||||
end
|
||||
end
|
||||
@@ -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
|
||||
@@ -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}"
|
||||
|
||||
Reference in New Issue
Block a user