fix(oauth): correct test expectation for invalid scope error handling
Per OAuth 2.0 spec (RFC 6749 Section 4.1.2.1), once redirect_uri is validated, errors like invalid scope should redirect to the client rather than return HTTP 400.
···30 response.status |> should.equal(400)
31}
3233-pub fn authorize_invalid_scope_returns_400_test() {
34 let assert Ok(cache) = did_cache.start()
35 let assert Ok(conn) = sqlight.open(":memory:")
36 let assert Ok(_) = tables.create_oauth_client_table(conn)
···76 None,
77 )
7879- // Should return 400 due to invalid scope format
80- response.status |> should.equal(400)
081}
···30 response.status |> should.equal(400)
31}
3233+pub fn authorize_invalid_scope_redirects_with_error_test() {
34 let assert Ok(cache) = did_cache.start()
35 let assert Ok(conn) = sqlight.open(":memory:")
36 let assert Ok(_) = tables.create_oauth_client_table(conn)
···76 None,
77 )
7879+ // Per OAuth 2.0 spec (RFC 6749 Section 4.1.2.1), once redirect_uri is validated,
80+ // errors should be redirected to the client, not returned as 400
81+ response.status |> should.equal(303)
82}