Sha256: b766929dd95408acf35791df7694da4670c22a049a2b18e9ba9596da004a0864

Contents?: true

Size: 373 Bytes

Versions: 4

Compression:

Stored size: 373 Bytes

Contents

module Alondra
  module IntegrationHelper
    def login_as(user)
      visit new_session_path
      fill_in "login", :with => user.username
      fill_in "password", :with => "secret"
      click_button "Log in"
    end

    def log_out
      click_link _('logout')
    end

    def clean_db
      [User, Chat, ::Message].each { |model| model.delete_all }
    end
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
alondra-0.1.1 test/support/integration_helper.rb
alondra-0.1.0 test/support/integration_helper.rb
alondra-0.0.4 test/support/integration_helper.rb
alondra-0.0.3 test/support/integration_helper.rb