Closed jmax closed 10 years ago
Scenario: Failed sign up
I visit "company/sign-up"
when I click on "Sign up"
then User.count should equal zero and Company.count should equal zero and page.content should have "Full Name can't be blank" and page.content should have "Company Name can't be blank" and page.content should have "Email can't be blank" and page.content should have "Password can't be blank"
Para la parte de la lógica de negocio, llevate de estos ejemplos:
https://github.com/jmax/nch/blob/master/app/models/user.rb https://github.com/jmax/nch/blob/master/app/models/company.rb https://github.com/jmax/nch/blob/master/spec/models/user_spec.rb https://github.com/jmax/nch/blob/master/app/views/devise/registrations/new.html.erb
Y para los spec requests, llevate de esto:
Juan hice un pull request de este Issue, después chequealo por favor. Ahora me voy a comer y a las 14hs tengo una clase. Termina y regreso a seguir trabajando.
2013/10/11 Juan María Martínez Arce notifications@github.com
Para la parte de la lógica de negocio, llevate de estos ejemplos:
https://github.com/jmax/nch/blob/master/app/models/user.rb https://github.com/jmax/nch/blob/master/app/models/company.rb https://github.com/jmax/nch/blob/master/spec/models/user_spec.rb
Y para los spec requests, llevate de esto:
https://gist.github.com/jmax/1cba12757c470352f742
— Reply to this email directly or view it on GitHubhttps://github.com/insignia4u/meoff/issues/2#issuecomment-26149281 .
Hugo S. Svoboda
I visit "company/sign-up"
when I fill in "Full Name" with "Bruce Wayne" and I fill in "Company Name" with "Wayne Inc" and I fill in "Email" with "bruce@wayne.com" and I fill in "Password" with "123123" and I fill in "Retype Password" with "123123" and I click on "Sign up"
then User.where(email: "bruce@wayne.com") should exist and Company.where(name: "Wayne Inc") should exist and Company.where(name: "Wayne Inc").first.users should include User.where(email: "bruce@wayne.com").first and an email confirmation should be sent to bruce@wayne.com