summaryrefslogtreecommitdiff
path: root/spec/integration
diff options
context:
space:
mode:
authormo khan <mo@mokhan.ca>2025-06-09 13:51:29 -0600
committermo khan <mo@mokhan.ca>2025-06-09 13:51:29 -0600
commitf42e23ad9847e11e86c77623eb77da3355b6d71b (patch)
tree1f1cbb1c1ffe1b10f6bd188afd7ece427d8a0b96 /spec/integration
parent14c7a0e3ebf77451662bbbac1915facdec0bca3f (diff)
test: switch to rspec
Diffstat (limited to 'spec/integration')
-rw-r--r--spec/integration/server_spec.rb46
1 files changed, 46 insertions, 0 deletions
diff --git a/spec/integration/server_spec.rb b/spec/integration/server_spec.rb
new file mode 100644
index 0000000..1271f05
--- /dev/null
+++ b/spec/integration/server_spec.rb
@@ -0,0 +1,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