refactor: simplifies auth class code #229
Annotations
2 errors and 1 warning
Test:
tests/auth_test.rb#L19
<Passage::PassageError> exception expected but was
<JWT::DecodeError(<Not enough or too many segments>)
/opt/hostedtoolcache/Ruby/3.1.6/x64/lib/ruby/gems/3.1.0/gems/jwt-2.9.3/lib/jwt/decode.rb:123:in `validate_segment_count!'
/opt/hostedtoolcache/Ruby/3.1.6/x64/lib/ruby/gems/3.1.0/gems/jwt-2.9.3/lib/jwt/decode.rb:23:in `decode_segments'
/opt/hostedtoolcache/Ruby/3.1.6/x64/lib/ruby/gems/3.1.0/gems/jwt-2.9.3/lib/jwt.rb:35:in `block in decode'
/opt/hostedtoolcache/Ruby/3.1.6/x64/lib/ruby/gems/3.1.0/gems/jwt-2.9.3/lib/jwt/deprecations.rb:8:in `context'
/opt/hostedtoolcache/Ruby/3.1.6/x64/lib/ruby/gems/3.1.0/gems/jwt-2.9.3/lib/jwt.rb:34:in `decode'
/home/runner/work/passage-ruby/passage-ruby/lib/passageidentity/auth.rb:24:in `validate_jwt'
/home/runner/work/passage-ruby/passage-ruby/tests/auth_test.rb:20:in `block in test_invalid_jwt'
/opt/hostedtoolcache/Ruby/3.1.6/x64/lib/ruby/gems/3.1.0/gems/test-unit-3.6.7/lib/test/unit/assertions.rb:1961:in `block (2 levels) in _assert_raise'
/opt/hostedtoolcache/Ruby/3.1.6/x64/lib/ruby/gems/3.1.0/gems/test-unit-3.6.7/lib/test/unit/assertions.rb:55:in `block in assert_block'
/opt/hostedtoolcache/Ruby/3.1.6/x64/lib/ruby/gems/3.1.0/gems/test-unit-3.6.7/lib/test/unit/assertions.rb:1913:in `_wrap_assertion'
/opt/hostedtoolcache/Ruby/3.1.6/x64/lib/ruby/gems/3.1.0/gems/test-unit-3.6.7/lib/test/unit/assertions.rb:54:in `assert_block'
/opt/hostedtoolcache/Ruby/3.1.6/x64/lib/ruby/gems/3.1.0/gems/test-unit-3.6.7/lib/test/unit/assertions.rb:1959:in `block in _assert_raise'
/opt/hostedtoolcache/Ruby/3.1.6/x64/lib/ruby/gems/3.1.0/gems/test-unit-3.6.7/lib/test/unit/assertions.rb:1918:in `_wrap_assertion'
/opt/hostedtoolcache/Ruby/3.1.6/x64/lib/ruby/gems/3.1.0/gems/test-unit-3.6.7/lib/test/unit/assertions.rb:1945:in `_assert_raise'
/opt/hostedtoolcache/Ruby/3.1.6/x64/lib/ruby/gems/3.1.0/gems/test-unit-3.6.7/lib/test/unit/assertions.rb:287:in `assert_raise'
/home/runner/work/passage-ruby/passage-ruby/tests/auth_test.rb:19:in `test_invalid_jwt'
/opt/hostedtoolcache/Ruby/3.1.6/x64/lib/ruby/gems/3.1.0/gems/test-unit-3.6.7/lib/test/unit/testcase.rb:896:in `run_test'
/opt/hostedtoolcache/Ruby/3.1.6/x64/lib/ruby/gems/3.1.0/gems/test-unit-3.6.7/lib/test/unit/testcase.rb:591:in `block (2 levels) in run'
/opt/hostedtoolcache/Ruby/3.1.6/x64/lib/ruby/gems/3.1.0/gems/test-unit-3.6.7/lib/test/unit/fixture.rb:276:in `block in create_fixtures_runner'
/opt/hostedtoolcache/Ruby/3.1.6/x64/lib/ruby/gems/3.1.0/gems/test-unit-3.6.7/lib/test/unit/fixture.rb:276:in `block in create_fixtures_runner'
/opt/hostedtoolcache/Ruby/3.1.6/x64/lib/ruby/gems/3.1.0/gems/test-unit-3.6.7/lib/test/unit/fixture.rb:257:in `run_fixture'
/opt/hostedtoolcache/Ruby/3.1.6/x64/lib/ruby/gems/3.1.0/gems/test-unit-3.6.7/lib/test/unit/fixture.rb:292:in `run_setup'
/opt/hostedtoolcache/Ruby/3.1.6/x64/lib/ruby/gems/3.1.0/gems/test-unit-3.6.7/lib/test/unit/testcase.rb:589:in `block in run'
/opt/hostedtoolcache/Ruby/3.1.6/x64/lib/ruby/gems/3.1.0/gems/test-unit-3.6.7/lib/test/unit/testcase.rb:588:in `catch'
/opt/hostedtoolcache/Ruby/3.1.6/x64/lib/ruby/gems/3.1.0/gems/test-unit-3.6.7/lib/test/unit/testcase.rb:588:in `run'
/opt/hostedtoolcache/Ruby/3.1.6/x64/lib/ruby/gems/3.1.0/gems/test-unit-3.6.7/lib/test/unit/test-suite-runner.rb:94:in `run_test'
/opt/hostedtoolcache/Ruby/3.1.6/x64/lib/ruby/gems/3.1.0/gems/test-unit-3.6.7/lib/test/unit/test-suite-runner.rb:60:in `block in run_tests'
/opt/hostedtoolcache/Ruby/3.1.6/x64/lib/ruby/gems/3.1.0/gems/test-unit-3.6.7/lib/test/unit/test-suite-runner.rb:59:in `each'
/opt/hostedtoolcache/Ruby/3.1.6/x64/lib/ruby/gems/3.1.0/gems/test-unit-3.6.7/lib/test/unit/test-suite-runner.rb:59:in `run_tests'
/opt/hostedtoolcache/Ruby/3.1.6/x64/lib/ruby/gems/3.1.0/gems/test-unit-3.6.7/lib/test/unit/test-suite-runner.rb:37:in `run'
/opt/hostedtoolcache/Ruby/3.1.6/x64/lib/ruby/gems/3.1.0/gems/test-unit-3.6.7/lib/test/unit/testsuite.rb:52:in `run'
/opt/hostedtoolcache/Ruby/3.1.6/x64/lib/ruby/gems/3.1.0/gems/test-unit-3.6.7/lib/test/unit/test-suite-runner.rb:94:in `run_test'
/opt/hostedtoolcache/Ruby/3.1.6/x64/lib/ruby/gems/3.1.0/gems/t
|
Test
Process completed with exit code 1.
|
ubuntu-latest pipelines will use ubuntu-24.04 soon. For more details, see https://github.com/actions/runner-images/issues/10636
|
Loading