Sha256: f5d1c9a18ff39836ccfaa590d426d5cd5120f0391b07714cb8729abc7c09d2e9
Contents?: true
Size: 781 Bytes
Versions: 3
Compression:
Stored size: 781 Bytes
Contents
$email_count ||= 0 def generate_unique_email $email_count += 1 "test#{$email_count}@example.com" end def valid_attributes(attributes={}) { :email => generate_unique_email, :password => '12345678', :password_confirmation => '12345678' }.update(attributes) end def new_user(attributes={}) User.new(valid_attributes(attributes)) end def create_user(attributes={}) User.create!(valid_attributes(attributes)) end def fill_sign_in_form(email, password) visit new_user_session_path within("#new_user") do fill_in 'Email', :with => email fill_in 'Password', :with => password end click_on 'Sign in' end def sign_cookie(name, val) verifier = ActiveSupport::MessageVerifier.new(RailsApp::Application.config.secret_token) verifier.generate(val) end
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
devise-authy-1.5.3 | spec/support/helpers.rb |
devise-authy-1.5.2 | spec/support/helpers.rb |
devise-authy-1.5.1 | spec/support/helpers.rb |