You'll have to check use_transactional_fixtures. When using transactional fixtures, because Selenium (or, any of the external drivers, which aren't Rack::Test) do not have access to information that has been written to the database. (as the transaction hasn't been "Committed")
You can resolve this within your test_helper.rb using the below code snippet:
class ActionDispatch::IntegrationTest
self.use_transactional_fixtures = false
end
At the same time, you may want to look into something like Database Cleaner, as without transactional fixtures, your database will become untidy.