blob: 1271f05b8c80c8b8896f89882c37a5754297960a (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
|
# frozen_string_literal: true
require 'spec_helper'
RSpec.describe "Server" do
let(:base_url) { "http://#{RSpec.configuration.bind_addr}" }
let(:client) { Net::Hippie::Client.new }
describe "GET /" do
it 'returns OK' do
response = client.get(base_url + "/")
expect(response.code).to eq("200")
end
end
describe "GET /404" do
it 'returns 404' do
response = client.get(base_url + "/404")
expect(response.code).to eq("404")
end
end
# https://datatracker.ietf.org/doc/html/rfc8414#section-3.1
describe "GET /.well-known/oauth-authorization-server" do
it 'returns OK' do
response = client.get(base_url + "/.well-known/oauth-authorization-server")
expect(response.code).to eq("200")
expect(response["Content-Type"]).to eq("application/json")
end
end
# https://datatracker.ietf.org/doc/html/rfc8693#section-2.3
describe "POST /token" do
pending
end
# https://datatracker.ietf.org/doc/html/rfc7662#section-2
describe "POST /introspect" do
pending
end
# https://datatracker.ietf.org/doc/html/rfc7009#section-2.1
describe "POST /revoke" do
pending
end
end
|