Created
November 20, 2014 17:31
-
-
Save Fernan2/5b46b0c62d93765c41ae to your computer and use it in GitHub Desktop.
Testing a factory
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| it 'debe ser factoría válida' do | |
| promocion = FactoryGirl.create(:promocion) | |
| 1000.times do | |
| usuario_ejemplo = FactoryGirl.create(:usuario_con_telefono) | |
| lead = FactoryGirl.create(:lead, promocion: promocion, nombre: usuario_ejemplo.nombre, apellido1: usuario_ejemplo.apellidos,telefono: usuario_ejemplo.telefono, email: usuario_ejemplo.email, empresa: Faker::Lorem.words(3).join) | |
| lead.save | |
| expect(lead.errors).to be_empty | |
| end | |
| end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment