diff options
| author | mo <mokha@cisco.com> | 2017-08-31 19:33:08 -0600 |
|---|---|---|
| committer | mo <mokha@cisco.com> | 2017-08-31 19:33:08 -0600 |
| commit | e5e38f1f1bcc7d7e3d616c4cef37e8453a3c6dde (patch) | |
| tree | 7d161f4475f24efca91aa92266c25c2fdcf63932 /spec/support | |
| parent | 63183ed8d366f80b58d7021af310cf60560d9123 (diff) | |
fix feature specs.
Diffstat (limited to 'spec/support')
| -rw-r--r-- | spec/support/authentication.rb | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/spec/support/authentication.rb b/spec/support/authentication.rb index c56c027d..1145db3c 100644 --- a/spec/support/authentication.rb +++ b/spec/support/authentication.rb @@ -11,4 +11,10 @@ module Authentication encode_credentials(user.authentication_token) request.env["HTTP_AUTHORIZATION"] = encoded_credentials end + + module Capybara + def http_login(user) + LoginPage.new.visit_page.login_with(email: user.email, password: "password") + end + end end |
