ruby on rails - Test capybara devise sign in with subdomain -
i want test sign in process. in app each user has it's own subdomain. , when seek test sign in process allways writes error password or email invalid.
here test code
scenario user = create(:confirmed_user) capybara.app_host = "http://#{user.subdomain}.lvh.me" visit new_user_session_path fill_in 'user_email', with: user.email fill_in 'user_password', with: "passw0rd" click_link_or_button "sign in" end
login , password 100% correct. i've tried written in article http://devblog.avdi.org/2012/08/31/configuring-database_cleaner-with-rails-rspec-capybara-and-selenium/ didn't help. also, test login of admin user without subdomain works perfectly.
maybe miss something? in advance.
ruby-on-rails ruby devise capybara
No comments:
Post a Comment