阅读背景:

如何使用RSpec和Factory_Bot测试Payola? (用户创建)

来源:互联网 

I've been trying to build a factory for my user model all day, and I can't seem to get past the ActiveRecord::AssociationTypeMismatch when attempting to manually put a value in the factory definition for the SubscriptionPlan. I don't know how to pass the subscription_plan to the user object. How can I create a user with factory_bot and append a subscription plan to get a passing spec? The code that I wrote is below, including the error message.I've been trying to build a factory for my user




你的当前访问异常,请进行认证后继续阅读剩余内容。

分享到: