spec/integration/spike.rb in mousetrap-0.4.1 vs spec/integration/spike.rb in mousetrap-0.4.2
- old
+ new
@@ -38,9 +38,27 @@
Mousetrap::Customer.destroy_all
end
#create_customer
destroy_all_customers
+customer = Factory :new_customer
+customer.save
+api_customer = Mousetrap::Customer[customer.code]
+puts api_customer.to_yaml
+puts '-' * 80
+
+customer_only_fields = Mousetrap::Customer.new \
+ :first_name => 'first',
+ :last_name => 'last',
+ :company => 'company',
+ :email => 'random@example.com',
+ :code => customer.code
+
+customer_only_fields.save
+
+api_customer = Mousetrap::Customer[customer.code]
+puts api_customer.to_yaml
+
#code = "rvhljmvenp@example.com"
#api_customer = Mousetrap::Customer[code]
##puts api_customer.to_yaml