I have the following test for the login controller (I guess it could go anywhere?):
test "Correct email must find user" do
u = User.where(email: 'test@email.com').first
puts "\n\n#{u}\n\n"
assert false
end
Here's test/fixtures/users.yml:
one:
email: 'test@email.com'
#
two: {}
# column: value
Here's what happens when I run rake test:
LoginControllerTest: test_Correct_email_must_find_user
------------------------------------------------------
D, [2015-09-13T21:05:23.277218 #2735] DEBUG -- : MONGODB | Adding localhost:27017 to the cluster.
test_Correct_email_must_find_user ERROR (0.01s)
KeyError: KeyError: key not found: "primary"
test/controllers/login_controller_test.rb:9:in `block in <class:LoginControllerTest>'
Aucun commentaire:
Enregistrer un commentaire