Module: Janus::TestHelper
- Defined in:
- lib/janus/test_helper.rb
Class Method Summary collapse
Instance Method Summary collapse
- #assert_authenticated(scope) ⇒ Object
- #assert_not_authenticated(scope) ⇒ Object
- #sign_in(user, options = {}) ⇒ Object
- #sign_out(user_or_scope = nil) ⇒ Object
Class Method Details
Instance Method Details
#assert_authenticated(scope) ⇒ Object
21 22 23 |
# File 'lib/janus/test_helper.rb', line 21 def assert_authenticated(scope) assert @janus.authenticated?(scope), "Expected #{scope} to be authenticated." end |
#assert_not_authenticated(scope) ⇒ Object
25 26 27 |
# File 'lib/janus/test_helper.rb', line 25 def assert_not_authenticated(scope) assert !@janus.authenticated?(scope), "Expected #{scope} to not be authenticated." end |
#sign_in(user, options = {}) ⇒ Object
9 10 11 |
# File 'lib/janus/test_helper.rb', line 9 def sign_in(user, = {}) @janus.login(user, ) end |