Sha256: 4e9ad16fe9cd06cf29b44975d8c0d0f59101f5a8b72a36c12d971212ac77af7a

Contents?: true

Size: 606 Bytes

Versions: 2

Compression:

Stored size: 606 Bytes

Contents

module TestHelpers
  module AuthenticationHelper
    def login(options={})
      username = options[:username] || "bricker"
      email    = options[:email]    || "bricker1@kpcc.org"
      password = options[:password] || "secret55"

      @user = create :user,
        :username                 => username,
        :email                    => email,
        :password                 => password,
        :password_confirmation    => password

      visit outpost_login_path
      fill_in "email", with: @user.email
      fill_in "password", with: password
      click_button "Submit"
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
outpost-cms-0.0.5 spec/support/authentication_helper.rb
outpost-cms-0.0.4 spec/support/authentication_helper.rb