BigW Consortium Gitlab

authentication.rb 310 Bytes
Newer Older
Nihad Abbasov committed
1 2 3 4 5 6 7 8 9
require Rails.root.join('spec', 'support', 'login_helpers')

module SharedAuthentication
  include Spinach::DSL
  include LoginHelpers

  Given 'I sign in as a user' do
    login_as :user
  end
10 11 12 13

  Given 'I sign in as an admin' do
    login_as :admin
  end
randx committed
14 15 16 17

  def current_user
    @user || User.first
  end
Nihad Abbasov committed
18
end