adding index to email column culprit for unit tests failing

后端 未结 2 410
天涯浪人
天涯浪人 2020-12-29 05:57

I am new to devise and rails and I just integrated devise with my sample app. What I noticed is after creating a user model, all my unit tests were failing. I went

2条回答
  •  天涯浪人
    2020-12-29 06:11

    The failure would have to be happening in the test setup, before the actual test. You are probably trying to set up users with identical email addresses, either via fixtures or factories.

    If you are using fixtures, make sure each user is given a different email address. If you are using factories, use a sequence to generate a unique email addresses for each user that's created.

提交回复
热议问题