Module: Etna::Spec::Auth

Defined in:
lib/etna/spec/auth.rb

Constant Summary collapse

AUTH_USERS =
{
  superuser: {
    email: '[email protected]', name: 'Zeus', perm: 'A:administration'
  },
  admin: {
    email: '[email protected]', name: 'Hera', perm: 'a:labors'
  },
  editor: {
    email: '[email protected]', name: 'Eurystheus', perm: 'E:labors'
  },
  restricted_editor: {
    email: '[email protected]', name: 'Copreus', perm: 'e:labors'
  },
  viewer: {
    email: '[email protected]', name: 'Hercules', perm: 'v:labors'
  },
  non_user: {
    email: '[email protected]', name: 'Nessus', perm: ''
  }
}

Instance Method Summary collapse

Instance Method Details

#auth_header(user_type) ⇒ Object



24
25
26
# File 'lib/etna/spec/auth.rb', line 24

def auth_header(user_type)
  header(*Etna::TestAuth.token_header(AUTH_USERS[user_type]))
end