Reputation: 675
I have a rails 5 app running the latest devise and I'd like to create valid users for testing with the fixtures, but I can't update the password as the way devise has users set up there is no passwords column in the users table.
Is there a way to set the fixture up to work around this and have a working user?
text/fixtures/users.yml:
jeremy:
email: [email protected]
provider: facebook
username: Jeremy
password: password
any test using that user returns:
ActiveRecord::Fixture::FixtureError: ActiveRecord::Fixture::FixtureError: table "users" has no column named "password".
Upvotes: 0
Views: 654
Reputation: 5204
Prepare your test database.
rake db:migrate
rake db:test:prepare
Upvotes: 1